- evaluate.sh: add --ignore-scripts to npm install (prevents husky from writing to permanent repo .git/hooks from the ephemeral worktree) - evaluate.sh: change --silent to --quiet (errors still printed on failure) - evaluate.sh: add `npx playwright install chromium` step so browser binaries are present even when the cached revision doesn't match ^1.55.1 - evaluate.sh: set CI=true inline on the playwright invocation so forbidOnly activates and accidental test.only() causes a gate failure - holdout.config.ts: document that CI=true is supplied by evaluate.sh - always-leave.spec.ts: add waitForReceipt() helper; replace fixed waitForTimeout(2000) after eth_sendTransaction with proper receipt polling so tx confirmation is not a timing assumption - always-leave.spec.ts: log the caught error in the button-cycling try/catch so contract reverts surface in the output - always-leave.spec.ts: add console.log when connect button or connector panel is not found to make silent-skip cases diagnosable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
46 lines
1.4 KiB
TypeScript
46 lines
1.4 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,
|
||
// evaluate.sh sets CI=true before invoking playwright, so forbidOnly is always
|
||
// active in the evaluator context. Accidental test.only() in any scenario file
|
||
// causes an immediate failure rather than a silent partial run.
|
||
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'] },
|
||
},
|
||
],
|
||
});
|