A component test runs in the low hundreds of ms. Full E2E for the same assertion costs a browser boot, a login, and half a payment flow.
The pipeline
that writes the test.
Five skills, one orchestrator. Generates POMs, MSW mocks, and Playwright specs for a page — then reports coverage per element. Same approach we use for E2E, shifted down to the component.
“We don't want another E2E suite. We want every element to know which tests cover it, and every page to answer the question in numbers.”
Five skills. One pass. A tested page.
The orchestrator picks up a page, runs it through Plan → POMs → Mocks → Tests → Coverage, and drops a suite into the MR. Each skill owns one job; the orchestrator glues them.
Reads the component. Writes the test plan — what's worth covering, what's noise.
Generates Page Object Models from the component tree. Selectors, actions, states — the vocabulary of the test.
Builds MSW handlers for every API the component touches. No real network in the test run.
Writes the Playwright specs that drive the POM, assert the states, and consume the mocks.
Tallies coverage per page and per element. Same numbers the Chrome plugin overlays on the running product.
Every page. Every element. Named specs behind them.
Coverage reports as numbers per page and per element. A Chrome plugin overlays the same data on the running product — hover any control to see the specs that cover it.
- Payment Form/checkout/pay89%67/75inspected in the plugin →
- Refund Confirm/payments/refund93%26/28
- Checkout/checkout72%103/143
- Dashboard/dashboard45%89/198
- Merchant Onboarding/onboarding44%41/94
- Settings/settings31%22/72
- ✓card-number.formats-as-you-type.spec
- ✓card-number.rejects-invalid-luhn.spec
- ✓card-number.handles-paste.spec
Component first. E2E only where it counts.
Most UI regressions live in one component. A full-page E2E walks the user through the story just to assert the same thing — slow, flaky, expensive. Shifting the assertion down cuts minutes off every MR.
MSW intercepts every network call at the component boundary. No flaky staging, no expired test cards, no racing provider webhooks.
When a component test fails, it names the component, the state, and the selector. An E2E failure says “somewhere in this 12-step journey, a button didn't appear.”
Cross-page flows, real payment providers, full auth handshakes. The E2E suite shrinks to the stories that actually need a browser on staging — and becomes as small as possible.
Three honest objections. Three honest answers.
AI-generated tests — can we trust them?
The pipeline produces specs, not decisions. A human reviewer still owns the MR. Generation just means the boring 80% (POMs, MSW handlers, happy-path specs) lands instantly, and the reviewer spends their time on the 20% that matters — edge cases, business rules, regression traps.
Won't we lose integration signal?
Integration signal comes from two components talking to one API. Those tests still exist — and they run at the component layer with MSW, not in a browser. The only thing E2E holds onto is the cases where a real browser + a real backend is genuinely the question.
Isn't component testing just unit tests with a browser?
It's the other way: unit tests prove the function returns the right value; component tests prove the user sees the right state. The Chrome plugin makes the difference visible — every element on a running page either has an assertion behind it, or it doesn't.