Fixtures in Trezor Suite E2E Tests
SkillWeb & browsingGuides your agent to write Playwright test fixtures with shared setup, teardown and dependency injection.
Use Fixtures in Trezor Suite E2E Tests in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Fixtures in Trezor Suite E2E Tests and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Fixtures in Trezor Suite E2E Tests skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Playwright fixture architecture in Suite E2E tests: scope, dependency injection, mocks lifecycle. Use whenever tests need shared setup, teardown or reusable resources.
What this skill tells your AI
The instructions your AI receives, as published by trezor/trezor-suite in suite/e2e/skills/fixtures/SKILL.md and read by ahel’s review.
When to use: Whenever tests need shared setup, teardown, reusable resources, or configurable context. Fixtures are Playwright's killer feature — prefer them over hooks in every situation where both could work. Prerequisites: locators for locator strategies and Understanding of Playwright test framework basics.
Decision Guide for New Fixtures
I need a new fixture in suite/e2e.
├── Is it a domain-specific page wrapper (Dashboard, Settings, Trading)?
│ └── YES → Add to TestFixtures in fixtures.ts
│ └── Depends on: page, device, other page objects
│ └── Scope: test (default)
│
├── Is it an expensive resource safe to share across all tests?
│ └── YES → Add to WorkerFixtures
│ └── Scope: worker
│ └── Cannot depend on page/context
│
├── Is it core environment setup (emulator, device, page)?
│ └── YES → Modify suiteBaseFixture.ts
│ └── Option fixtures for configuration
│ └── Auto fixtures for auto-run behavior
│
└── Is it adding methods to page object?
└── YES → Modify enhancePage.ts
└── Use module augmentation (declare module '@playwright/test')
└── Applied automatically to all pages
└── Note: Any additions should be considered carefully for not polluting the global Page interface
Anti-Patterns to Avoid
❌ Anti-Pattern 1: Fixture Without Teardown for Resources
// BAD: Creates mock, never stops it
tradingMock: async ({ page }, use) => {
const mock = new TradingMock(page);
await use(mock);
// Missing: await mock.stop();
},
❌ Anti-Pattern 2: Not Declaring Fixture in Test Signature
// BAD: Fixture created but test doesn't use it
test('example', async ({ page }) => {
// dashboardPage is never requested, fixture doesn't run
const dash = new DashboardPage(page, ...); // Manual creation is wrong
});
Exception: Test needs to initialize page object manually for some reason (second tab, manual start).
❌ Anti-Pattern 3: Worker Fixture Depending on Page
// BAD: Worker fixture cannot access page
wcSignClient: [
async ({ page }, use) => { // ❌ page is test-scoped
const client = new WalletConnectSignClient();
await client.init();
await use(client);
},
{ scope: 'worker' },
],
Signals
- GitHub stars
- 1k
- Forks
- 384
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
fixtures-trezor- Source
- github.com/trezor/trezor-suite
github.com/trezor/trezor-suite
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptbrowser-use
Skill · browser-use
More in Web & browsingwebapp-testing
Skill · anthropics
More in Web & browsingplaywright-cli
Skill · microsoft
More in Web & browsingbenchmark
Skill · affaan-m
More in Web & browsing