Skip to content

Run codec retry coverage in the existing Playwright suite - #1601

Merged
adamshiervani merged 1 commit into
devfrom
test/video-codec-retry-e2e
Sep 7, 2026
Merged

Run codec retry coverage in the existing Playwright suite#1601
adamshiervani merged 1 commit into
devfrom
test/video-codec-retry-e2e

Conversation

@adamshiervani

@adamshiervani adamshiervani commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Move the codec-capability retry regression from the standalone .mjs harness into ui/e2e/video-codec.spec.ts, so it runs with the existing video-codec Playwright 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.mjs and 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.

JETKVM_URL=http://<device> npx playwright test --project=video-codec

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 getSupportedVideoCodecs RPC 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 asserts video-codec-retry visibility, 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 fake useJsonRpc). 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.

@adamshiervani
adamshiervani marked this pull request as ready for review September 7, 2026 16:40
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T16:43:37.454412Z a2258fc Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@adamshiervani
adamshiervani merged commit f13f346 into dev Sep 7, 2026
5 checks passed
@adamshiervani
adamshiervani deleted the test/video-codec-retry-e2e branch September 7, 2026 16:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant