laravel:e2e-playwright

Run Playwright End-to-End tests for Laravel applications with database seeding and authentication.

1|Updated Sep 22, 2025
One-click install
npx skills add https://github.com/meistro57/chat_bridge --skill laravel-e2e-playwright
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel:e2e-playwright
Source: https://github.com/meistro57/chat_bridge/tree/main/.claude/skills/e2e-playwright
Command: npx skills add https://github.com/meistro57/chat_bridge --skill laravel-e2e-playwright

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the common challenges of flaky, slow, and hard-to-maintain End-to-End (E2E) tests in Laravel applications, ensuring test reliability and developer productivity.

Core Features & Use Cases

  • Environment Management: Integrates with Laravel Sail and custom .env files for isolated test environments.
  • State Management: Utilizes database seeding and factories for consistent test data setup and teardown.
  • Selector Strategy: Promotes stable test selectors using data-testid attributes to minimize refactoring impact.
  • Authentication: Optimizes login flows by reusing session state or using API-based user creation.
  • Use Case: Ensure a critical user registration flow functions correctly across different browser environments by running a suite of Playwright tests that set up users, perform actions, and verify outcomes.

Quick Start

Run the E2E Playwright tests using sail pnpm playwright:test.

Frequently Asked Questions about laravel:e2e-playwright

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

FAQPage Schema
How do I set up reliable E2E tests for Laravel using Playwright?

Reliable E2E tests for Laravel using Playwright are set up by managing test environments, database seeding, and authentication strategies. This approach integrates with Laravel Sail and custom .env files to ensure isolated, consistent automated testing.

What's the best way to prevent flaky Playwright tests in a Laravel application?

Preventing flaky Playwright tests in a Laravel application is best achieved by using stable selectors like data-testid attributes. This practice minimizes refactoring impact and ensures reliable automated test execution across different browser environments.

Does this Playwright testing approach work with Laravel Sail?

Yes, this Playwright testing approach works directly with Laravel Sail for streamlined execution. You can run your E2E test suite using the sail pnpm playwright:test command, utilizing custom .env files for isolated test environments.

How do you manage authentication and database state in Laravel E2E tests?

Authentication and database state in Laravel E2E tests are managed by reusing session state or using API-based user creation. State management utilizes database seeding and factories for consistent test data setup and teardown across automated runs.

Why use data-testid attributes for Laravel Playwright selectors?

Using data-testid attributes for Laravel Playwright selectors promotes test stability by decoupling tests from CSS or DOM structure changes. This selector strategy minimizes refactoring impact and reduces flaky test failures during automated execution.