import { expect, test } from "@playwright/test"; import { state } from "./support"; test.describe("first dispatch (CR-022 Step 22.4)", () => { test("a new player who skips the welcome has a run in flight within 30 seconds", async ({ page, }) => { await page.goto("/"); const started = Date.now(); await page.getByRole("button", { name: "Start your company" }).click(); const welcome = page.getByRole("dialog", { name: "Welcome to Deadhead" }); await welcome.getByRole("button", { name: "Skip" }).click(); await page.getByRole("button", { name: "Fly it" }).first().click(); await expect.poll(async () => (await state(page)).activeDispatches.length).toBe(1); expect(Date.now() - started).toBeLessThan(30_000); }); });