e2e-testing

Standardize Playwright end-to-end tests for RedisInsight with page objects and UI navigation.

8.7k|482|Updated Jul 30, 2021
One-click install
npx skills add https://github.com/redis/RedisInsight --skill e2e-testing-redis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: e2e-testing
Source: https://github.com/redis/RedisInsight/tree/main/.ai/skills/e2e-testing
Command: npx skills add https://github.com/redis/RedisInsight --skill e2e-testing-redis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents flaky, hard-to-maintain end-to-end tests by standardizing Playwright test structure, page objects, fixtures, and navigation patterns specifically for RedisInsight.

Core Features & Use Cases

  • Playwright E2E package structure: Enforces a standalone layout under tests/e2e-playwright/ with TEST_PLAN.md as the source of truth for coverage and sequencing.
  • Consistent page object model: Defines a stateless Page Object hierarchy (BasePage, InstancePage, and component-based composition) and encourages passing databaseId to navigation methods.
  • Flakiness-resistant execution: Provides rules for when to use beforeAll/afterAll vs beforeEach, how to split Playwright projects (main/auto-update/electron), and how to avoid common anti-patterns that break Electron compatibility.
  • UI-based navigation only: Requires using page-object goto() methods (not direct page.goto URL navigation) so tests work in both browser mode and Electron mode.

Quick Start

Use the e2e-testing Skill when adding or modifying tests under tests/e2e-playwright/ to follow the prescribed project structure, stateless page objects, UI-based navigation, and TEST_PLAN.md-driven coverage updates.

Frequently Asked Questions about e2e-testing

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

FAQPage Schema
How do I structure Playwright E2E tests to prevent flaky execution?

Prevent flaky Playwright E2E tests by enforcing a standalone package structure with a test plan, using stateless page objects, and applying strict beforeAll/beforeEach setup and cleanup patterns for maintainable test code.

How do I make Playwright tests work in both browser and Electron modes?

Make Playwright tests work in both browser and Electron modes by using UI-based navigation exclusively. Call page-object goto() methods with databaseId instead of direct page.goto URL routing to ensure Electron compatibility.

What is a stateless page object model in Playwright test fixtures?

A stateless page object model in Playwright uses a hierarchy like BasePage and InstancePage with component-based composition. It passes databaseId to navigation methods rather than holding internal state, ensuring tests remain isolated and maintainable.

When should I use beforeAll vs beforeEach in Playwright test projects?

Use beforeAll for one-time project setup and beforeEach for test-specific state isolation. Splitting Playwright projects into main, auto-update, and electron categories helps manage execution state correctly and prevents common flakiness anti-patterns.

Does using direct page.goto URL routing break Electron compatibility in E2E tests?

Yes, using direct page.goto URL routing breaks Electron compatibility in E2E tests. You must use page-object goto() methods for UI navigation so tests execute reliably across both standard browser and Electron environments.

What is the best way to manage E2E test coverage and sequencing for RedisInsight?

The best way to manage E2E test coverage and sequencing for RedisInsight is maintaining a TEST_PLAN.md file as the single source of truth, ensuring all test additions and modifications follow the prescribed project structure and coverage updates.