chore: starter template

This commit is contained in:
e2e
2026-07-10 22:25:02 +02:00
commit 33da14f99e
157 changed files with 6462 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import {
Given,
When,
Then,
Before,
After,
defineParameterType,
setDefaultTimeout,
} from '@cucumber/cucumber'
import { registerBrowserSteps, registerBrowserHooks } from '@pikku/cucumber/browser'
// The shared browser vocabulary ({actor} grammar, form/click/see steps, the
// "every page loads without errors" sweep) and the browser lifecycle hooks.
// Per-domain business steps belong in ../steps/*.steps.ts.
registerBrowserSteps({ Given, When, Then, defineParameterType })
registerBrowserHooks({ Before, After, setDefaultTimeout })
// The page-load sweep visits every route in one step, so give scenarios plenty
// of room. Per-action waits are still bounded by the package's config.timeout.
setDefaultTimeout(Number(process.env.E2E_SCENARIO_TIMEOUT ?? 300_000))
// Don't start a scenario while the dev server is mid-restart (it 5xx's /api
// for a few seconds on boot / file change) — that race reads as a phantom
// failure. Server orchestration itself stays outside these tests.
Before(async function (this: import('./world.js').AppWorld) {
const actor = await this.actor(undefined)
await actor.waitForServerReady()
})