What problem does it solve?
Writing browser end-to-end tests for the Composer app often fails because selectors target translated labels or ambiguous role names, producing flaky tests that break on copy changes. This Skill enforces a stable, testid-first testing discipline with page objects so specs stay readable and resilient.
Core Features & Use Cases
- Testid-first selector strategy: Mandates
data-testid targeting (never labels, text, or role names) and explains how to add testids to components, including properties.testId for menu and toolbar actions.
- Page-object architecture: Directs all interactions through
AppManager and per-plugin helpers under plugins/ so specs express intent rather than inline selectors.
- Stability and execution rules: Covers running with
DX_PWA=false moon run composer-app:e2e, browser selection, throttled cold-start harness options, and web-first assertions instead of waitForTimeout.
- Use Case: When adding a spec for the Inbox plugin, create an
Inbox page object under plugins/, add inbox.message.reply testids to the components, and write the spec driving the real UI via createSpace and createObject.
Quick Start
Write a new Playwright spec for the Composer Inbox plugin that selects a thread and verifies the companion opens, using data-testid selectors and a page-object helper.