e2e-testing
Playwright and Cypress patterns, selectors, assertions, API mocking, visual testing, and CI/CD
npx skills add cosmicstack-labs/mercury-agent-skills --skill e2e-testing --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# E2E Testing End-to-end testing with Playwright and Cypress. ## Tool Choice | Factor | Playwright | Cypress | |--------|-----------|---------| | Language | JS/TS, Python, C#, Java | JS/TS only | | Browser support | Chromium, Firefox, WebKit | Chromium, Firefox, WebKit | | Iframe support | Native | Limited | | Network mocking | Route API | intercept() | | Parallel execution | Built-in | Dashboard required | ## Playwright Patterns ### Selector Strategy (Priority Order) 1. `getByRole()` — best for accessibility 2. `getByText()` — for text content 3. `getByTestId()` — for complex components 4. `getByLabel()` — for form fields 5. `locator(CSS)` — last resort ### Test Structure ```typescript test.describe('Checkout Flow', () => { test('completes purchase with valid card', async ({ page }) => { await page.goto('/products'); await page.getByText('Add to Cart').first().click(); await page.getByRole('button', { name: 'Checkout' }).click(); await page.getByLabel('Card Number').fill('4242424242424242'); await page.getByRole('button', { name: 'Pay' }).click(); await expect(page.getByText('Thank you')).toBeVisible(); }); }); ``` ## Visual Testing - Use `await expect(page).toHaveScreenshot()` -
- Tool Choice
- Playwright Patterns
- Selector Strategy (Priority Order)
- Test Structure
- Visual Testing
- CI Integration
What does the e2e-testing skill do?
Playwright and Cypress patterns, selectors, assertions, API mocking, visual testing, and CI/CD
How do I install it?
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill e2e-testing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.