E2e Test
This skill equips you to write comprehensive end-to-end tests for user interface features using Playwright's testing framework. It guides you through structuring tests with page object models and data factories, enabling maintainable and scalable test suites that validate real user workflows.
E2e Test guides you through writing comprehensive end-to-end tests using Playwright's testing framework. Start by setting up your test infrastructure with fixtures and helpers, then structure your tests using page object models to encapsulate UI interactions. Write test cases that validate real user workflows, use data factories to generate test data consistently, and run tests in various modes—headed for interactive debugging, debug mode for step-by-step inspection, or CI mode for automated validation. E2e Test helps you organize test specs logically and apply assertion patterns that reliably verify UI behavior.
AI-generated summary based on this skill's SKILL.md
Install
maximhq/bifrost/e2e-test · repository language: Go
git clone https://github.com/maximhq/bifrost
cp -r bifrost/.claude/skills/e2e-test ~/.claude/skills/e2e-testFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I write and run end-to-end tests with Playwright?
E2e Test guides you through writing comprehensive end-to-end tests using Playwright's testing framework. Start by setting up your test infrastructure with fixtures and helpers, then structure your tests using page object models to encapsulate UI interactions. Write test cases that validate real user workflows, use data factories to generate test data consistently, and run tests in various modes—headed for interactive debugging, debug mode for step-by-step inspection, or CI mode for automated validation. E2e Test helps you organize test specs logically and apply assertion patterns that reliably verify UI behavior.
What is the best approach for fixing failing e2e tests and debugging them?
E2e Test provides strategies for debugging, fixing, and auditing failing or incorrect end-to-end tests to improve test reliability. When tests fail, use Playwright's debug mode to step through interactions and inspect element states. E2e Test teaches you to identify flaky tests—those that fail intermittently—and apply robust assertion patterns and proper cleanup and teardown procedures to eliminate race conditions. Audit your test specs regularly to catch issues early, and use data-testid selector strategies for stable element targeting that won't break when UI styling changes.
How does E2e Test help keep my Playwright tests in sync when UI components change?
E2e Test includes guidance on automatically detecting UI changes and syncing affected end-to-end tests to keep them aligned with component modifications. By using page object models and data-testid selectors, your tests remain decoupled from brittle CSS selectors. When UI components are updated, you update the page object layer once, and all dependent tests automatically reflect those changes. This approach minimizes test maintenance overhead and ensures your test suite stays current as your Bifrost UI evolves.
What role do page objects and data factories play in E2e Test?
E2e Test emphasizes using page object models and data factories as core patterns for maintainable and scalable test suites. Page objects encapsulate UI interactions and selectors for each page or component, making tests more readable and reducing duplication. Data factories generate consistent, realistic test data on demand, eliminating hardcoded values and making tests easier to modify. Together, these patterns enable you to write tests that are resilient to UI changes, easier to debug, and simpler to extend as your application grows.
How do I set up and maintain E2e Test infrastructure including fixtures and helpers?
E2e Test guides you through setting up and maintaining end-to-end test infrastructure, including Playwright fixtures, helpers, and best practices. Configure fixtures to initialize test state, manage authentication, and clean up resources between tests. Build helper utilities for common operations like navigation, form filling, and assertion validation. Organize your test spec files logically by feature or page, and establish a consistent structure for fixtures and helpers that your team can follow. E2e Test also covers Playwright CI environment setup so your tests run reliably in automated pipelines.
What are the key best practices for end-to-end testing with Playwright?
E2e Test teaches end-to-end testing best practices that ensure your Playwright test suite is reliable, maintainable, and effective. Use data-testid selectors instead of fragile CSS or XPath selectors to target UI elements stably. Structure tests with page objects to keep selectors and interactions organized. Implement proper cleanup and teardown to prevent test pollution. Apply consistent assertion patterns that clearly express what behavior you're validating. Run tests in headed mode during development for interactive debugging, and in CI mode for automated validation. Organize your test specs by feature or page, and use data factories to generate realistic test data consistently.
SKILL.md
rendered from the published skill — quoted content, verbatim
name: e2e-test description: Write, run, debug, audit, and auto-update Playwright E2E tests for the Bifrost UI. Use when asked to create new E2E tests, add test coverage, fix flaky tests, debug failing tests, audit test correctness, update tests after UI changes, or sync tests with modified components. Invoked with /e2e-test <FEATURE_NAME>, /e2e-test fix <SPEC_FILE>, /e2e-test sync, or /e2e-test audit. allowed-tools: Read, Grep, Glob, Bash, Edit, Write, Task, AskUserQuestion, TodoWrite
Playwright E2E Testing
Write, run, debug, and auto-update Playwright E2E tests following Bifrost's established patterns and conventions. Automatically detects UI changes and updates affected tests.
Usage
``` /e2e-test <FEATURE_NAME> # Create or update tests for a feature /e2e-test fix <SPEC_FILE> # Debug and fix a failing test /e2e-test run <FEATURE_NAME> # Run tests for a specific feature /e2e-test run # Run all E2E tests /e2e-test sync # Detect UI changes and update affected tests /e2e-test sync <FEATURE_NAME> # Sync tests for a specific feature with UI changes /e2e-test audit
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
.claude/skills/e2e-test/SKILL.md