Run codec retry coverage in the existing Playwright suite - #1601
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2258fccca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| test("codec capability requests recover from errors, invalid replies and timeouts without accepting stale replies", async ({ | ||
| page, | ||
| }) => { | ||
| test.setTimeout(60_000); |
There was a problem hiding this comment.
Allow setup time beyond the deliberate RPC timeout
Increase the test timeout beyond the setup helper's timeout plus the intentional 10-second wait. In the video-codec project, ensureRpcReady(page) may legitimately retry for up to 60 seconds, but this line caps the entire test at the same 60 seconds; if device/WebRTC readiness takes roughly 45 seconds or more, Playwright aborts before the 10-second capability-timeout scenario completes, and may also prevent the finally restoration from succeeding.
Useful? React with 👍 / 👎.
Move the codec-capability retry regression from the standalone
.mjsharness intoui/e2e/video-codec.spec.ts, so it runs with the existingvideo-codecPlaywright project.The test opens the real video settings page and intercepts only capability RPC requests. It covers RPC errors, malformed replies, the real 10-second timeout, retry recovery, and ignoring a stale reply while a newer request is pending. It restores the original codec preference afterward. Removes
ui/tests/video-codec-retry.mjsand adds no dependencies or runner configuration.Follow-up to #1594.
Validation: all six video-codec E2E tests passed on RV1106 with the firmware validated for #1594 (50.8 seconds, no retries). Focused lint, formatting, and test discovery pass.
Note
Low Risk
Test-only refactor: removes a standalone harness and adds E2E coverage with no production code changes.
Overview
Moves codec-capability retry regression coverage from the standalone Rolldown/Playwright script into
ui/e2e/video-codec.spec.ts, so it runs with the existing video-codec Playwright project against the real app.The new test opens Settings → Video, intercepts only
getSupportedVideoCodecsRPC sends on the WebRTC data channel, and simulates JSON-RPC errors, invalid results, the real 10s timeout, retry clicks, and a stale reply that must not enable the codec select while a newer request is pending. It assertsvideo-codec-retryvisibility, select disabled/enabled state, and final option list, then restores the original codec preference.Deletes
ui/tests/video-codec-retry.mjs(bundled mini-harness with fakeuseJsonRpc). No runner or dependency changes beyond consolidating tests.Reviewed by Cursor Bugbot for commit a2258fc. Bugbot is set up for automated code reviews on this repo. Configure here.