Skip to content

Port Playwright's check, wait-for-url, locator-list and selectors-text tests - #1064

Merged
kblok merged 2 commits into
mainfrom
issue-1060-playwright-page-tests
Nov 4, 2026
Merged

kblok merged 2 commits into
mainfrom
issue-1060-playwright-page-tests

Conversation

@kblok

@kblok kblok commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Upstream added Playwright's own page tests to its testbed suite in one 130-file commit. This is the first slice of that port: the testbed learns to serve /content (a page from base64 HTML, Playwright's page.setContent) and Playwright's test assets, and four test files run on it. The next slices add the other files, listed in the plan on #1060.

Upstream change ported. e2e-inc/e2e#1505, commit bdf769b: apps/testbed/tests/{check,wait-for-url,locator-list,selectors-text}.e2e.ts, apps/testbed/tests/helpers.ts (content, PREFIX), and apps/testbed/app/playwright/routes.mjs (/content, the asset server) with the assets empty.html and grid.html, LICENSE, and NOTICE (Apache-2.0, kept next to the assets).

Layout: Check/PageCheckTests.cs (13), WaitForUrl/PageWaitForUrlTests.cs (7), LocatorList/LocatorListTests.cs (1), SelectorsText/SelectorsTextTests.cs (2), in tests/E2E.NUnit.Tests, category playwright (upstream's tag). 23 tests, all pass.

Not ported, as upstream (its header lists them; the feature is missing in e2e too): check: label with position, both trial runs, setChecked. wait-for-url: waitUntil (3 tests) and frame.waitForURL. selectors-text: 20 tests that need text=/:text selectors, >> chains, or element handles.

Known difference. HasText_and_internal_text_should_match_full_node_text_in_strict_mode keeps all its assertions, but the first GetByText("hello") match on <div id=div1><span id=span1>hello</span>world</div> has no id: #1062. It runs inside ExpectedToFailAsync and starts failing when that is fixed. The two uncheck ... by aria role tests are upstream fail: tests too (uncheck refuses role=radio); they use the same helper.

.NET-only symbols. Helpers.ExpectedToFailAsync and Helpers.Equal (test-only): the port has no fail test option (COMPATIBILITY.md), and NUnit records an assertion made in a test body even if the body catches it, so Equal throws. PlaywrightTest (base class: playground base URL, cache off, playwright category), in place of upstream's test.describe(..., { requires: ['browser'], tags: ['playwright'] }). Helpers.PREFIX reads the testbed's own port, as upstream's fixed 4271 cannot work with a random port. PlaywrightRoutes is upstream's routes.mjs, so far /content and the assets.

Public API and docs: no change (test infrastructure only); COMPATIBILITY.md has one new line.

Refs #1060 (first slice; the other files are still to port)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK

…t tests (Refs #1060)

The testbed gets the /content route and Playwright's test assets (with its LICENSE and NOTICE), and the first four of upstream's Playwright page test files run against them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 77f48c2 and b9f92cf.

Files selected for processing: 14
  • COMPATIBILITY.md
  • tests/E2E.Agent.Tests/PlaywrightRoutes.cs
  • tests/E2E.Agent.Tests/Testbed.cs
  • tests/E2E.NUnit.Tests/Check/PageCheckTests.cs
  • tests/E2E.NUnit.Tests/E2E.NUnit.Tests.csproj
  • tests/E2E.NUnit.Tests/Helpers/Helpers.cs
  • tests/E2E.NUnit.Tests/LocatorList/LocatorListTests.cs
  • tests/E2E.NUnit.Tests/SelectorsText/SelectorsTextTests.cs
  • tests/E2E.NUnit.Tests/Testbed/playwright/LICENSE
  • tests/E2E.NUnit.Tests/Testbed/playwright/NOTICE
  • tests/E2E.NUnit.Tests/Testbed/playwright/assets/empty.html
  • tests/E2E.NUnit.Tests/Testbed/playwright/assets/grid.html
  • tests/E2E.NUnit.Tests/WaitForUrl/PageWaitForUrlTests.cs
  • tests/E2E.XUnit.V3.Tests/E2E.XUnit.V3.Tests.csproj
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…nce of expected failures (Refs #1060)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ls2e1yaZFgZ3FEJkYScfkK
@kblok

kblok commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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