laravel:e2e-playwright

Automate Laravel end-to-end tests with Playwright and Sail integration.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/Patkik/Multi-tenant-SaaS-Catering-V2 --skill laravel-e2e-playwright-patkik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel:e2e-playwright
Source: https://github.com/Patkik/Multi-tenant-SaaS-Catering-V2/tree/main/.agents/skills/e2e-playwright
Command: npx skills add https://github.com/Patkik/Multi-tenant-SaaS-Catering-V2 --skill laravel-e2e-playwright-patkik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generic E2E patterns for Laravel using Playwright that improve reliability, speed, and maintainability of tests by standardizing state setup, seeds, selectors, authentication flows, environment handling, and Sail integration.

Core Features & Use Cases

  • State & Seeds: Provide seeders for common scenarios (users, roles, demo content) and use factories for per-test setup with state reset.
  • Test IDs & Selectors: Prefer data-testid attributes and maintain selector stability across refactors.
  • Auth & Environment: Reuse storage state when possible; support API-driven user setup to reduce UI flakiness; support Sail integration for local environments.

Quick Start

Run Sail-enabled tests with Sail pnpm playwright:test, or run non-Sail tests with 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 end-to-end testing in Laravel using Playwright?

End-to-end testing in Laravel using Playwright involves standardizing state setup with seeders, applying data-testid attributes for stable selectors, and executing tests via a command like pnpm playwright:test.

Can I run Playwright tests with Laravel Sail for local development?

Playwright tests can run within the Laravel Sail environment using the sail pnpm playwright:test command, supporting local Docker-based testing workflows alongside non-Sail environments.

What is the best way to manage authentication in Playwright tests for Laravel?

Authentication in Laravel Playwright tests is best managed by reusing storage state and supporting API-driven user setup, which reduces UI flakiness and speeds up test execution.

How do I prevent flaky UI tests when refactoring Laravel application code?

Prevent flaky UI tests by using data-testid attributes for selectors, ensuring selector stability across refactors, and relying on deterministic test steps with proper state reset.

Do I need to use database seeders for Laravel Playwright test automation?

Using database seeders for common scenarios like users and roles is recommended, combined with factories for per-test setup, to ensure reliable state reset and deterministic testing.

Does this Playwright testing approach work without Laravel Sail?

The Playwright testing approach supports both Sail and non-Sail environments, allowing you to run tests directly using pnpm playwright:test without requiring Docker.