electron-e2e-testing

Standardize Electron E2E testing with Playwright via the window.__e2e runtime contract.

Updated May 1, 2026
One-click install
npx skills add https://github.com/arthur-debert/release --skill electron-e2e-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: electron-e2e-testing
Source: https://github.com/arthur-debert/release/tree/main/skills/electron-e2e-testing
Command: npx skills add https://github.com/arthur-debert/release --skill electron-e2e-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates flaky, slow Electron end-to-end tests by standardizing a runtime contract and deterministic testing patterns so your CI results match your local results.

Core Features & Use Cases

  • Runtime contract for tests: Implements a shared window.__e2e API with readiness flags (window.__e2e.ready.*), an append-only structured event log (window.__e2e.events), and a test bridge (window.__e2e.bridge) for deterministic state changes.
  • Deterministic synchronization: Replaces timing hacks with readiness polling and event-driven assertions so tests wait for real integration boundaries (LSP/IPC/file/model transitions) instead of sleeps.
  • Deep, resilient assertions: Encourages asserting on underlying model data (via the bridge) and structured events rather than brittle DOM strings or console-log parsing.
  • CI + environment conventions: Standardizes E2E_* environment variables for consistent app startup, isolation, headless behavior, and trace capture.

Quick Start

Use the electron-e2e-testing Skill to migrate your app to the window.__e2e contract, then update your Playwright E2E suite to wait on readiness/events and assert through the bridge for integration correctness.

Frequently Asked Questions about electron-e2e-testing

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

FAQPage Schema
How do I fix flaky Electron E2E tests in Playwright?

Fix flaky Electron E2E tests by replacing timing hacks and `waitForTimeout` with readiness polling and event-driven assertions. This Skill uses a `window.__e2e` runtime contract to wait for real integration boundaries like LSP or IPC transitions, ensuring deterministic synchronization.

What is a runtime contract for deterministic E2E testing?

A runtime contract for deterministic E2E testing standardizes test synchronization through a shared `window.__e2e` API. It implements readiness flags, an append-only structured event log, and a test bridge for state changes, replacing brittle DOM string assertions and console-log parsing with deep, resilient assertions.

How do I set up a Playwright CI pipeline for Electron applications?

Set up a Playwright CI pipeline for Electron by standardizing `E2E_*` environment variables for consistent app startup, isolation, headless behavior, and trace capture. This ensures your CI results match local results by enforcing consistent runtime behavior across environments.

Why are my Playwright Electron tests failing in CI but passing locally?

Playwright Electron tests fail in CI due to non-deterministic timing where assertions run before effects are observable. This Skill resolves CI inconsistencies by requiring readiness flags to be set after effects are observable and replacing arbitrary sleeps with event-driven waits.

When should I assert on structured events instead of DOM strings in E2E tests?

Assert on structured events instead of DOM strings when verifying integration correctness in E2E tests. This Skill encourages asserting on underlying model data via a typed bridge and structured event log, providing deep, resilient assertions that avoid brittle UI-based checks.