Ops: Browser UAT
Perform browser-based user acceptance testing using Playwright MCP tools.
Argument: $ARGUMENTS — scenario and environment (e.g., smoke-test dev, login staging, player-detail dev, custom production /path)
Prerequisites
- Load Playwright MCP tools — use
ToolSearchto search forplaywright browserand load all browser tools. - Verify target environment is up — curl check the frontend URL before launching the browser.
- For localhost — ensure the frontend is running on port 8081.
Discovery
Before running any scenario, read these project files to discover configuration:
e2e/constants.ts— environment URLs, test credentials (phone, OTP), timeouts, viewportse2e/selectors.ts— alldata-testidvalues organized by feature areae2e/fixtures/auth.fixture.ts— exact login/logout flow to replicate via MCP toolsplaywright.config.ts— video/trace recording config, test directory
Authentication Procedure
Replicate the login flow from e2e/fixtures/auth.fixture.ts using Playwright MCP tools. Read the file to get the exact steps, which typically follow this pattern:
Login
browser_navigateto{BASE_URL}/signinbrowser_snapshotto discover page elementsbrowser_fill_form— fill the phone input (discover placeholder text from auth fixture)- Wait for form validation debounce (typically 500ms)
browser_click— click the "Next" buttonbrowser_wait_for— wait for URL to containconfirm-code(timeout from constants)browser_snapshotto discover OTP inputbrowser_fill_form— fill the OTP input (discover testid from selectors, value from constants)browser_wait_for— wait for URL to NOT containconfirm-codebrowser_take_screenshot— capture login proof
Dismiss Error Overlay
Expo's development error overlay may appear. Dismiss it:
browser_evaluatewith script:document.getElementById('error-overlay')?.remove(); document.querySelectorAll('[id*="error"]').forEach(el => el.remove());browser_press_key— press "Escape" as backup
Check if Logged In
// browser_evaluate
localStorage.getItem("@authData") !== null
Logout
Discover the menu button and sign-out flow from e2e/selectors.ts and e2e/fixtures/auth.fixture.ts:
browser_click— menu button element (discover testid from selectors)browser_click— element with text "Sign Out"browser_wait_for— URL containssignin
Selector Reference
Read e2e/selectors.ts to get the complete data-testid reference for the project. The selectors object is organized by feature area (auth, nav, home sections, player detail, etc.).
Use [data-testid="{TESTID}"] to target elements in Playwright MCP tools.
Built-in UAT Scenarios
1. smoke-test
Full app walkthrough. Read e2e/selectors.ts to identify which sections and elements to verify:
- Login (auth procedure above)
- Home screen — verify key sections exist using selectors from the project
- Feature pages — navigate to 2-3 key routes and verify content loads
- Logout → verify redirect to signin
- Screenshot at each step
2. login
Just the login flow with screenshot proof.
3. home-screen
Login → verify all home screen sections have data. Screenshot each section.
4. custom
Login → navigate to user-specified URL → interact as instructed → screenshot.
Proof Recording
At each verification point:
browser_take_screenshot— visual proof of current statebrowser_console_messages— check for JavaScript errorsbrowser_network_requests— monitor for failed API calls (4xx, 5xx)
Output Format
Report UAT results as a table:
| Step | Action | Status | Notes | |------|--------|--------|-------| | 1 | Navigate to /signin | PASS | Page loaded in 1.2s | | 2 | Enter phone number | PASS | Input accepted | | 3 | Click Next | PASS | Navigated to /confirm-code | | 4 | Enter OTP | PASS | OTP accepted | | 5 | Verify home screen | PASS | All sections present | | 6 | Logout | PASS | Redirected to /signin |
Include total PASS/FAIL count and any JS errors or failed network requests observed.