Stats
Actions
Tags
From test-builder
Generate end-to-end tests that verify complete user workflows through the UI — Playwright or Cypress
How this skill is triggered — by the user, by Claude, or both
Slash command
/test-builder:e2e-testsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate end-to-end tests for: **$0**
Generate end-to-end tests for: $0
Framework: $1 (default: playwright)
Map the user flow — Break the feature into discrete user actions:
Identify test scenarios:
Write tests:
import { test, expect } from "@playwright/test";
test.describe("Checkout Flow", () => {
test.beforeEach(async ({ page }) => {
// Seed test data or use API to set up state
await page.goto("/products");
});
test("user can complete a purchase", async ({ page }) => {
// Add item to cart
await page.click('[data-testid="add-to-cart-btn"]');
await expect(page.locator('[data-testid="cart-count"]')).toHaveText("1");
// Go to checkout
await page.click('[data-testid="checkout-btn"]');
await expect(page).toHaveURL(/\/checkout/);
// Fill shipping
await page.fill('[name="address"]', "123 Test St");
await page.fill('[name="city"]', "Test City");
await page.click('[data-testid="continue-btn"]');
// Confirm order
await page.click('[data-testid="place-order-btn"]');
await expect(page.locator("h1")).toHaveText("Order Confirmed");
});
test("shows validation errors for empty shipping form", async ({ page }) => {
await page.click('[data-testid="add-to-cart-btn"]');
await page.click('[data-testid="checkout-btn"]');
await page.click('[data-testid="continue-btn"]');
await expect(page.locator('[data-testid="address-error"]')).toBeVisible();
});
});
class CheckoutPage {
constructor(private page: Page) {}
async fillShipping(address: string, city: string) {
await this.page.fill('[name="address"]', address);
await this.page.fill('[name="city"]', city);
}
async placeOrder() {
await this.page.click('[data-testid="place-order-btn"]');
}
}
e2e/ or tests/e2e/ directorye2e/pages/ if neededdata-testid attributes for selectors — never select by CSS class or text content that may changepage.waitForTimeout() — use expect with auto-waiting or waitForSelectorafterAll or database reset)Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub silviaare95/xari-plugins --plugin test-builder