Replace shell-script scenario runner with Playwright. The evaluator now runs `npx playwright test --config scripts/harb-evaluator/holdout.config.ts` after booting the stack, using the existing tests/setup/ wallet-provider and navigation infrastructure. Changes: - scripts/harb-evaluator/holdout.config.ts — new Playwright config pointing to scenarios/, headless chromium, 5-min timeout per test - scripts/harb-evaluator/scenarios/sovereign-exit/always-leave.spec.ts — Playwright spec that buys KRK through the LocalSwapWidget then sells it back via the injected wallet provider, asserting sovereign exit works - scripts/harb-evaluator/evaluate.sh — adds root npm install step (needed for npx playwright), exports STACK_* env aliases for getStackConfig(), replaces shell-script loop with a single playwright test invocation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
||
|
||
/**
|
||
* Playwright config for holdout scenarios.
|
||
*
|
||
* Holdout specs live under scripts/harb-evaluator/scenarios/ and reuse the
|
||
* existing tests/setup/ infrastructure (wallet-provider, stack, navigate).
|
||
*
|
||
* The evaluator boots the stack first, then runs:
|
||
* npx playwright test --config scripts/harb-evaluator/holdout.config.ts
|
||
*
|
||
* Required env vars (set by evaluate.sh):
|
||
* STACK_RPC_URL – Anvil JSON-RPC endpoint
|
||
* STACK_WEBAPP_URL – Vite dev server URL
|
||
* STACK_GRAPHQL_URL – Ponder GraphQL endpoint
|
||
*/
|
||
export default defineConfig({
|
||
testDir: './scenarios',
|
||
fullyParallel: false,
|
||
forbidOnly: !!process.env.CI,
|
||
retries: 0,
|
||
workers: 1,
|
||
reporter: 'list',
|
||
timeout: 5 * 60 * 1000, // 5 min per test — scenarios involve on-chain txns
|
||
expect: {
|
||
timeout: 30_000,
|
||
},
|
||
use: {
|
||
headless: true,
|
||
viewport: { width: 1280, height: 720 },
|
||
screen: { width: 1280, height: 720 },
|
||
actionTimeout: 60_000,
|
||
launchOptions: {
|
||
args: ['--disable-dev-shm-usage', '--no-sandbox'],
|
||
},
|
||
},
|
||
projects: [
|
||
{
|
||
name: 'chromium',
|
||
use: { ...devices['Desktop Chrome'] },
|
||
},
|
||
],
|
||
});
|