skills/practices/e2e-testing/SKILL.md
End-to-end testing and visual validation using Playwright MCP. Use when verifying frontend UI, testing user flows, inspecting network/console, capturing screenshots, or validating application behavior in the browser.
npx skillsauth add devjarus/coding-agent e2e-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
All browser verification runs through Playwright MCP (configured with --caps=vision,testing,tracing). It drives flows off the accessibility tree, asserts state, records traces, and inspects network + console — token-efficiently and cross-browser.
No Lighthouse / heap profiling via MCP. Deep performance profiling, Lighthouse scores, and memory snapshots are not available through an MCP server in this plugin. When a perf budget needs Lighthouse, run it as a committed script (e.g.
lighthouseCLI /@lhci/cliin the project's test suite) and record the numbers as evidence — codified > ad-hoc.
Navigate to the page:
browser_navigate to the target URLTake a snapshot to understand the page:
browser_snapshot returns the accessibility tree with element refsInteract using refs from the snapshot:
browser_click — click buttons, linksbrowser_fill_form — fill multiple form fields at oncebrowser_type — type into a specific inputbrowser_select_option — choose from dropdownsbrowser_press_key — keyboard actions (Enter, Tab, Escape)Assert expected state:
browser_verify_text_visible — check text appears on pagebrowser_verify_element_visible — check element is present and visiblebrowser_verify_value — check input/element has expected valuebrowser_verify_list_visible — verify a list of items appearsCapture evidence:
browser_take_screenshot — visual proof of statebrowser_start_tracing / browser_stop_tracing — full trace for debugging failuresPlaywright MCP uses the accessibility tree by default — structured refs instead of pixel coordinates. This is:
Only use --caps=vision tools (xy-coordinate clicks) when the accessibility tree doesn't expose the element.
Use browser_generate_locator to get a Playwright-compatible locator string for any element on the page. Useful for writing persistent test scripts.
browser_network_requests — see all requests for the page, filter by typebrowser_network_request — inspect a specific request/response headers and bodyUseful for verifying API contracts between frontend and backend.
browser_console_messages — catch client-side errors and warnings (filter by level)Catch unhandled exceptions and React warnings during a flow.
browser_console_messages shows no errors, main content visible)browser_network_requests — verify correct endpoints are calledbrowser_network_request — verify request/response shapes match specbrowser_console_messages| Agent | Playwright MCP | |-------|---------------| | Frontend Lead | Testing flows, assertions, screenshots | | Frontend Specialists | Verify their component works in browser | | Reviewer | Verify spec compliance visually, network contract validation, console-error checks | | Debugger utility | Console errors, network inspection |
testing
Multi-source research method — decompose a question, fan out parallel investigators, interleaved-think each result, verify claims adversarially, synthesize a cited answer. Use for breadth-heavy research, stack comparisons, "which approach wins" questions.
testing
Decide when to use unit vs integration vs e2e tests, and when to mock vs use the real thing per dependency. Dependency injection is the enabler — without it you end up monkey-patching imports. Apply when writing tests of any kind.
development
Test-driven development process — write failing test, implement to pass, refactor. Use when implementing any feature or fixing bugs.
development
Patterns for sharing types, API contracts, and validation schemas between frontend and backend. Use when multiple domains consume the same data shapes to prevent contract drift.