| name | ops-browser-uat |
| description | Browser-based user acceptance… |
| allowed-tools | ["Bash","Read"] |
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 the current runtime's tool-discovery mechanism to search for
playwright browser and 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, viewports
e2e/selectors.ts — all data-testid values organized by feature area
e2e/fixtures/auth.fixture.ts — exact login/logout flow to replicate via MCP tools
playwright.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_navigate to {BASE_URL}/signin
browser_snapshot to discover page elements
browser_fill_form — fill the phone input (discover placeholder text from auth fixture)
- Wait for form validation debounce (typically 500ms)
browser_click — click the "Next" button
browser_wait_for — wait for URL to contain confirm-code (timeout from constants)
browser_snapshot to discover OTP input
browser_fill_form — fill the OTP input (discover testid from selectors, value from constants)
browser_wait_for — wait for URL to NOT contain confirm-code
browser_take_screenshot — capture login proof
Dismiss Error Overlay
Expo's development error overlay may appear. Dismiss it:
browser_evaluate with 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
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 contains signin
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 state
browser_console_messages — check for JavaScript errors
browser_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.