E2E Testing with Playwright

Creates and maintains Playwright-based end-to-end tests for web applications in Node.js.

21|4|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/arunoda/OkBrain --skill e2e-testing-with-playwright
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: E2E Testing with Playwright
Source: https://github.com/arunoda/OkBrain/tree/main/.agent/skills/e2e_testing
Command: npx skills add https://github.com/arunoda/OkBrain --skill e2e-testing-with-playwright

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a robust framework and guidelines for writing and maintaining end-to-end tests, ensuring the stability and reliability of the Brain application.

Core Features & Use Cases

  • User-Centric Selectors: Emphasizes testing based on visible user interactions, not internal test IDs.
  • UI Interaction & Waiting: Provides strategies for reliable element interaction and asynchronous content handling.
  • Database Access: Allows direct DB verification when UI checks are insufficient, using a dedicated test database.
  • Parallel Test Execution: Guides on structuring tests for efficient, parallel runs using beforeAll and setupPageWithUser.
  • Core Utilities: Offers helpers for environment loading, DB cleanup, user setup, and API response waiting.
  • Use Case: Developers can write tests to verify that a new chat message appears correctly after being sent, or that a document can be successfully created and displayed.

Quick Start

Use the E2E Testing skill to write a new test for the chat interface.

Frequently Asked Questions about E2E Testing with Playwright

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

FAQPage Schema
How do I write reliable end-to-end tests for web applications without using internal test IDs?

Reliable end-to-end testing emphasizes user-centric selectors based on visible user interactions rather than internal test IDs. This Skill enforces best practices for selector strategies and UI interactions to ensure your tests remain stable and accurately reflect user behavior.

What is the best way to handle asynchronous waiting and UI interactions in Playwright?

Handling asynchronous waiting in Playwright requires robust strategies for reliable element interaction. This Skill provides specific guidelines for asynchronous content handling and UI interactions to prevent flaky tests and ensure consistent execution results.

Can I verify database state directly during Playwright test execution?

Database verification is supported during Playwright test execution using a dedicated test database. You can perform direct database assertions when UI checks are insufficient, ensuring comprehensive validation of your application's underlying data state.

How do I structure Playwright tests for parallel execution in a Node.js environment?

Parallel test execution in a Node.js environment is achieved by structuring tests with dedicated setup and cleanup utilities. This Skill guides you in using beforeAll and setupPageWithUser helpers to enable efficient, parallel test runs without conflicts.

Does this Playwright testing framework provide utilities for environment loading and database cleanup?

The framework provides core utilities for environment loading, database cleanup, user setup, and API response waiting. These helpers streamline the test setup and teardown processes, allowing you to focus on verifying application features like chat messages or document creation.