e2e-testing

Automate Playwright end-to-end browser tests for Laravel applications.

Updated Jan 6, 2023
One-click install
npx skills add https://github.com/pekral/phpstan-rules --skill e2e-testing-pekral
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: e2e-testing
Source: https://github.com/pekral/phpstan-rules/tree/main/.claude/skills/e2e-testing
Command: npx skills add https://github.com/pekral/phpstan-rules --skill e2e-testing-pekral

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the challenge of maintaining stable, deterministic end-to-end browser tests in Laravel applications by enforcing the Page Object Model and robust, condition-based waiting strategies.

Core Features & Use Cases

  • Stable Automation: Implements Page Object Model (POM) to decouple test logic from UI selectors, ensuring tests remain maintainable during design changes.
  • Deterministic Execution: Replaces brittle, time-based waits with auto-waiting locators and state-based assertions to eliminate flaky test results.
  • Use Case: Use this skill when you need to verify complex user flows like multi-step authentication or search functionality in a Laravel application while ensuring the test suite remains fast and reliable in CI environments.

Quick Start

Use the e2e-testing skill to generate a new Playwright page object and test specification for the user registration flow.

Frequently Asked Questions about e2e-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate stable Playwright E2E tests for Laravel applications?

Automating stable Playwright E2E tests for Laravel involves implementing the Page Object Model to decouple test logic from UI selectors and using auto-waiting locators to eliminate flaky results. This approach ensures tests remain maintainable during design changes.

Why does my Playwright E2E testing suite produce flaky results in CI environments?

Flaky Playwright E2E testing results often stem from brittle, time-based waits. Replacing them with state-based assertions and deterministic execution patterns ensures reliable test suite performance in CI environments by verifying actual application state.

What is the best way to structure Playwright browser tests for complex user flows?

The best way to structure Playwright browser tests for complex flows is applying the Page Object Model. This pattern decouples test logic from UI selectors, ensuring tests remain maintainable and reliable when verifying multi-step authentication or search functionality.

Do I need an existing Playwright configuration to run E2E tests on Laravel?

Yes, you need an existing Playwright configuration to run E2E tests on Laravel. The testing process requires this setup to generate page objects and test specifications while adhering to deterministic patterns using role-based selectors.

How do I handle authentication state reuse when testing Laravel applications with Playwright?

Handling authentication state reuse when testing Laravel applications with Playwright requires applying deterministic testing patterns. By using role-based selectors and condition-based waiting strategies, you can reliably verify complex multi-step authentication flows.