From hb
Writes end-to-end tests for user flows using Cypress with @testing-library/cypress selectors. Activates when user asks to write e2e tests or add Cypress tests.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hb:e2eThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run in parallel:
Run in parallel:
package.json for cypress versioncypress.config.ts for baseUrl and test file patternscypress/e2e/ to match conventionscypress/e2e/ — one file per flow or featuredescribe('login flow', () => {
beforeEach(() => {
cy.visit('/login')
})
it('logs in with valid credentials', () => {
cy.findByLabelText('Email').type('[email protected]')
cy.findByLabelText('Password').type('password')
cy.findByRole('button', { name: 'Sign in' }).click()
cy.url().should('include', '/dashboard')
cy.findByRole('heading', { name: 'Dashboard' }).should('be.visible')
})
it('shows error with invalid credentials', () => {
cy.findByLabelText('Email').type('[email protected]')
cy.findByLabelText('Password').type('wrong')
cy.findByRole('button', { name: 'Sign in' }).click()
cy.findByRole('alert').should('contain.text', 'Invalid credentials')
})
})
Prefer @testing-library/cypress commands when installed, e.g. cy.findByRole('button', { name: 'Submit' }); use cy.get('[data-testid="submit"]') only as a last resort.
See selectors.md for the full priority guide.
@testing-library/cypress selectors when available, else cy.getdata-testid only as last resortit blockcy.wait(<number>) — use cy.findBy* auto-retry insteadcypress is not in package.json → stop and ask user to install Cypress firstcypress.config.ts is missing → ask user to run npx cypress open to initialize configbaseUrl is unreachable → verify the dev server is running before writing tests that require itnpx claudepluginhub helderberto/agent-skills --plugin hbCreates, updates, and fixes Cypress E2E and component tests. Activates when user asks to write, add, or fix tests, even without mentioning Cypress.
Configures and writes end-to-end tests with Playwright or Cypress for validating user flows, browser integration, CI E2E tests, acceptance tests, and production smoke tests.
Build E2E test specs for critical user journeys — Playwright or Cypress, page objects, setup/teardown, CI config. Use when asked to "write E2E tests", "end-to-end testing", "browser tests", "UI tests", or "Playwright tests".