From test-builder
Generate end-to-end tests that verify complete user workflows through the UI — Playwright or Cypress
npx claudepluginhub silviaare95/xari-plugins --plugin test-builderThis skill uses the workspace's default tool permissions.
Guides reliable browser automation using Playwright and Puppeteer for web testing, scraping, and AI agent interactions. Covers selectors, waits, isolation, and anti-detection patterns.
Provides checklists to review code for functionality, quality, security, performance, tests, and maintainability. Use for PRs, audits, team standards, and developer training.
Enforces A/B test setup with gates for hypothesis locking, metrics definition, sample size calculation, assumptions checks, and execution readiness before implementation.
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)