From aj-geddes-useful-ai-prompts-4
Designs and implements scalable test automation frameworks using Page Object Model, fixtures, reporting for Playwright/TypeScript and pytest/Python. Use for test architecture, organization, and infrastructure.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin aj-geddes-useful-ai-prompts-4This skill uses the workspace's default tool permissions.
- [Overview](#overview)
references/configuration-management.mdreferences/custom-reporter.mdreferences/custom-test-utilities.mdreferences/page-object-model-playwrighttypescript.mdreferences/pytest-framework-python.mdreferences/test-fixtures-and-factories.mdreferences/test-organization.mdscripts/scaffold-tests.shtemplates/test-template.jsSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
A test automation framework provides structure, reusability, and maintainability for automated tests. It defines patterns for organizing tests, managing test data, handling dependencies, and generating reports. A well-designed framework reduces duplication, improves reliability, and accelerates test development.
Minimal working example:
// framework/pages/BasePage.ts
import { Page, Locator } from "@playwright/test";
export abstract class BasePage {
constructor(protected page: Page) {}
async goto(path: string) {
await this.page.goto(path);
}
async waitForPageLoad() {
await this.page.waitForLoadState("networkidle");
}
async takeScreenshot(name: string) {
await this.page.screenshot({ path: `screenshots/${name}.png` });
}
protected async clickAndWait(locator: Locator) {
await Promise.all([
this.page.waitForResponse((resp) => resp.status() === 200),
locator.click(),
]);
}
}
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Page Object Model (Playwright/TypeScript) | Page Object Model (Playwright/TypeScript) |
| Test Fixtures and Factories | Test Fixtures and Factories |
| Custom Test Utilities | Custom Test Utilities |
| Configuration Management | Configuration Management |
| Custom Reporter | Custom Reporter |
| pytest Framework (Python) | pytest Framework (Python) |
| Test Organization | Test Organization |