Agentic E2E Test Creation Workflow
When to use: When writing a new Playwright e2e test from a user story, feature description, or bug report. Prerequisites: Read all other skills in this directory before proceeding — this file only covers the workflow order and what to discover first. The rules for each area live in their dedicated skill.
Step 1 — Find the right test folder
onboarding flow? → tests/onboarding/
wallet / accounts? → tests/wallet/
settings? → tests/settings/
trading / buy / sell? → tests/trading/
passphrase? → tests/passphrase/
staking? → tests/staking/
metadata / labels? → tests/metadata/
general suite flow? → tests/suite/
browser-only scenario? → tests/browser/
none of the above? → tests/<feature-name>/
Check for an existing file in that folder first — the test may belong there.
Step 2 — Discover before writing
Do not write a single line of test code before completing all three of these:
Page objects — Read support/pageObjects/ and map every user action in the story to an existing page object method or locator. Rules for when to extend vs create are in page-objects.
Fixtures and mocks — Check support/fixtures.ts and support/mocks/ for what already exists. Rules for fixture scope and mock lifecycle are in fixtures.
Tags — Determine device models, platform constraint, and execution scope before writing the test signature. Rules are in tagging.
Step 3 — Test file structure
import { expect, test } from '../../support/fixtures';
test.use({ deviceSetup: { mnemonic: 'mnemonic_all' } });
test.describe('<feature> - <scenario>', { tag: ['@T3W1', '@T3T1'] }, () => {
test.beforeEach(async ({ onboardingPage }) => {
await onboardingPage.completeOnboarding();
});
test('<what the user can do>', async ({ dashboardPage, walletPage }) => {
// Arrange → Act → Assert
});
});
- Import
testandexpectfrom../../support/fixtures, never from@playwright/testdirectly. - Test names describe user capability (
'User can send BTC'), not implementation ('send BTC test'). - One user story per
test()block.
Pre-submit checklist
- Existing page objects and fixtures were checked before creating new ones
- Test is in the correct folder under
tests/ - Imports from
../../support/fixtures, not@playwright/test - Tags cover device models, platform, and execution scope → tagging
- Assertions use web-first assertions and translation keys → assertions
- No hardcoded
waitForTimeoutcalls → retries - Locators are in page objects, not scattered in tests → locators
- New page objects registered in
fixtures.ts→ page-objects - New mocks have
start()/stop()lifecycle and fixture registration → fixtures
Re-running the CI workflow after a failure
MUST: Re-run the whole workflow ("Re-run all jobs"), never a single failed job.
Tests are distributed across the matrix machines by Currents orchestration under one build id per run attempt. "Re-run failed jobs" starts a new attempt where only the re-run machine joins, so it receives every test of the run and hits the job timeout.