Conversation
4b9f24c to
d045a7f
Compare
2 tasks
Deploying rstest with
|
| Latest commit: |
7767da5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cb900432.rstest.pages.dev |
| Branch Preview URL: | https://locator.rstest.pages.dev |
2 tasks
7d936df to
d4a1e8d
Compare
9aoy
approved these changes
Mar 2, 2026
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c76865faf
ℹ️ 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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a native Playwright-style Locator query + action + assertion API to Rstest browser mode. The core design uses an IR (Intermediate Representation) + RPC + Provider abstraction architecture, ensuring future extensibility to multiple browser drivers without changing test code.
User API (Playwright-style surface)
Design goal: zero learning curve for users already familiar with Playwright.
Core Architecture: IR-Driven Client/Host Communication
Why IR?
Provider Abstraction: Multi-Provider Architecture
A
BrowserProviderImplementationinterface is introduced:A structural type
BrowserProviderPage(a subset mirror of Playwright'sPage) is also defined to avoid leaking Playwright types into the framework core. Adding a new provider (e.g., WebDriver BiDi) only requires implementing this interface and registering it in theproviderImplementationsmap — no changes needed on the test-side API.Current Playwright Provider Support
getByRole,getByText,getByLabel,getByPlaceholder,getByAltText,getByTitle,getByTestId,locator(css)filter({ has, hasNot, hasText, hasNotText }),and(),or(),nth(),first(),last()click,dblclick,fill,hover,press,clear,check,uncheck,focus,blur,scrollIntoViewIfNeeded,waitFor,dispatchEvent,selectOption,setInputFilestoBeVisible,toBeHidden,toBeEnabled,toBeDisabled,toBeChecked,toBeUnchecked,toBeAttached,toBeDetached,toBeEditable,toBeFocused,toBeEmpty,toBeInViewport,toHaveText,toContainText,toHaveValue,toHaveId,toHaveAttribute,toHaveClass,toHaveCount,toHaveCSS,toHaveJSPropertysetTestIdAttributeKey Code Locations
Browser side (build IR + send RPC):
browser/src/client/locator.ts— Locator class, chained step/IR generationbrowser/src/rpcProtocol.ts— IR type definitions (serialization protocol core)browser/src/client/browserRpc.ts— RPC transportbrowser/src/client/api.ts—expect.element/ page entry pointsbrowser/src/augmentExpect.ts— expect type augmentationHost/Provider side (routing + compilation + execution):
browser/src/providers/index.ts— provider abstraction and registrationbrowser/src/browserRpcRegistry.ts— supported API registry (single source of truth)browser/src/providers/playwright/compileLocator.ts— IR → Playwright Locatorbrowser/src/providers/playwright/dispatchBrowserRpc.ts— action/assertion executionCompatibility
dispatchRouter+ namespace) — no protocol bloatChecklist