Skip to content

Playwright config

Import your configureDemoWalk module from playwright.config.ts so every spec — including ones that import overlay helpers directly — sees personas and layout.

ts
// playwright.config.ts
import { defineConfig } from '@playwright/test';
import './e2e/demo-walk-config';

export default defineConfig({
  testDir: './e2e',
  // Keep Playwemo stamps; only this folder is wiped each run.
  outputDir: 'test-results/playwright',
  use: { baseURL: 'http://localhost:5173' },
});
ts
// e2e/demo-walk-config.ts
import { configureDemoWalk } from '@dragonmastery/playwemo';

configureDemoWalk({
  personas: { ADMIN: { bg: '#f59e0b', fg: '#111827' } },
  startPath: '/login',
});

The library must be built (dist/index.mjs) before Playwright resolves the package. In a bun/turbo monorepo, dependsOn: ["^build"] covers that. Locally: bun run build in this repo, or the package’s tsdown script.

Released under the MIT License.