
E2e Testing Automation
Generate Cypress end-to-end specs for signup, validation, and dashboard flows using data-cy selectors and optional API verification hooks.
Overview
e2e-testing-automation is an agent skill most often used in Ship (also Build) that supplies Cypress E2E examples for authentication, validation, and API-backed assertions.
Install
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill e2e-testing-automationWhat is this skill?
- Cypress describe blocks with beforeEach cy.visit for repeatable auth flows
- Registration example with timestamped email, password confirmation, and terms checkbox
- Assertions on URL routes, welcome copy, and validation error messages
- Optional cy.request check against a test emails API for welcome-message delivery
- Uses data-cy and name attributes for stable selectors
Adoption & trust: 551 installs on skills.sh; 250 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are about to ship a web signup flow but lack copy-paste Cypress coverage for happy paths, validation errors, and post-submit verification.
Who is it for?
Indie builders with a React or similar SPA who want Cypress E2E starters for auth and form validation in staging.
Skip if: Teams standardized on Playwright-only stacks, native mobile UI automation, or backend-only services with no browser surface.
When should I use this skill?
When you need Cypress E2E examples for authentication, form validation, and optional API verification during pre-release testing.
What do I get? / Deliverables
You get runnable Cypress spec patterns you can adapt into cypress/e2e suites and extend into your CI pipeline before launch.
- Cypress e2e spec files for auth and validation scenarios
- Selector and assertion patterns for dashboard redirects
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Ship because the skill delivers executable E2E test code meant to run before release, not initial product discovery. Testing subphase matches browser automation that asserts URLs, UI copy, form errors, and backend side effects via cy.request.
Where it fits
Add data-cy attributes to signup buttons and fields while the agent drafts matching Cypress specs.
Run authentication.cy.js locally before tagging a release candidate.
Extend the same suite when you change password rules or dashboard routes after launch.
How it compares
Template-style Cypress snippets for Ship—not a hosted test runner or MCP browser server.
Common Questions / FAQ
Who is e2e-testing-automation for?
Solo developers shipping web products who want agent help drafting Cypress flows for registration, errors, and light API checks.
When should I use e2e-testing-automation?
Use in Ship testing while hardening auth before release, and in Build frontend work when you add data-cy hooks and first E2E specs alongside new pages.
Is e2e-testing-automation safe to install?
Check the Security Audits panel on this page; generated tests may call real or staging URLs and test APIs—avoid production secrets in specs.
SKILL.md
READMESKILL.md - E2e Testing Automation
# Cypress E2E Tests ## Cypress E2E Tests ```javascript // cypress/e2e/authentication.cy.js describe("User Authentication Flow", () => { beforeEach(() => { cy.visit("/"); }); it("should register a new user account", () => { cy.get('[data-cy="signup-button"]').click(); cy.url().should("include", "/signup"); // Fill registration form const timestamp = Date.now(); cy.get('[name="email"]').type(`user${timestamp}@example.com`); cy.get('[name="password"]').type("SecurePass123!"); cy.get('[name="confirmPassword"]').type("SecurePass123!"); cy.get('[name="firstName"]').type("Test"); cy.get('[name="lastName"]').type("User"); // Accept terms cy.get('[name="acceptTerms"]').check(); // Submit form cy.get('button[type="submit"]').click(); // Verify success cy.url().should("include", "/dashboard"); cy.get(".welcome-message").should("contain", "Welcome, Test!"); // Verify email sent (check via API) cy.request(`/api/test/emails/${timestamp}@example.com`) .its("body") .should("have.property", "subject", "Welcome to Our App"); }); it("should handle validation errors", () => { cy.get('[data-cy="signup-button"]').click(); // Submit empty form cy.get('button[type="submit"]').click(); // Check for validation errors cy.get(".error-message").should("have.length.greaterThan", 0); cy.get('[name="email"]').parent().should("contain", "Email is required"); // Fill invalid email cy.get('[name="email"]').type("invalid-email"); cy.get('[name="password"]').type("weak"); cy.get('button[type="submit"]').click(); cy.get('[name="email"]').parent().should("contain", "Invalid email format"); cy.get('[name="password"]') .parent() .should("contain", "Password must be at least 8 characters"); }); it("should login with valid credentials", () => { // Create test user first cy.request("POST", "/api/test/users", { email: "test@example.com", password: "Password123!", name: "Test User", }); // Login cy.get('[data-cy="login-button"]').click(); cy.get('[name="email"]').type("test@example.com"); cy.get('[name="password"]').type("Password123!"); cy.get('button[type="submit"]').click(); // Verify login successful cy.url().should("include", "/dashboard"); cy.getCookie("auth_token").should("exist"); // Verify user menu cy.get('[data-cy="user-menu"]').click(); cy.get(".user-email").should("contain", "test@example.com"); }); it("should maintain session across page reloads", () => { // Login cy.loginViaAPI("test@example.com", "Password123!"); cy.visit("/dashboard"); // Verify logged in cy.get(".user-menu").should("exist"); // Reload page cy.reload(); // Still logged in cy.get(".user-menu").should("exist"); cy.getCookie("auth_token").should("exist"); }); it("should logout successfully", () => { cy.loginViaAPI("test@example.com", "Password123!"); cy.visit("/dashboard"); cy.get('[data-cy="user-menu"]').click(); cy.get('[data-cy="logout-button"]').click(); cy.url().should("equal", Cypress.config().baseUrl + "/"); cy.getCookie("auth_token").should("not.exist"); }); }); // Custom command for login Cypress.Commands.add("loginViaAPI", (email, password) => { cy.request("POST", "/api/auth/login", { email, password }).then( (response) => { window.localStorage.setItem("auth_token", response.body.token); }, ); }); ``` # Page Object Model Pattern ## Page Object Model Pattern ```typescript // pages/LoginPage.ts import { Page, Locator } from "@playwright/test"; export class LoginPage { readonly page: Page; readonly emailInput: Locator; readonly passwordInput: Locator; readonly loginButton: Locator; readonly errorMessage: Locator; constructor(page: Page) { this.page = page; this.emailInput = page.locator('[name="email"]'); thi