Step 22.4: regression
CI / check (push) Successful in 6m57s
Details
CI / check (push) Successful in 6m57s
Details
An e2e check that a new player who skips the welcome has a run in flight within 30 seconds. Full suite and e2e pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
49998fb4ce
commit
90bc8e814e
|
|
@ -1762,3 +1762,7 @@ Implementation decisions not spelled out in `memory-bank/implementation-plan.md`
|
||||||
|
|
||||||
- **The welcome gate remembers a close per company id**: "Start a new company" keeps the save's id but makes a new company id, and the new company must get its own welcome.
|
- **The welcome gate remembers a close per company id**: "Start a new company" keeps the save's id but makes a new company id, and the new company must get its own welcome.
|
||||||
- **How to play doesn't leave Settings**: "Close" just closes it; only a new company's welcome goes to Contracts.
|
- **How to play doesn't leave Settings**: "Close" just closes it; only a new company's welcome goes to Contracts.
|
||||||
|
|
||||||
|
## Step 22.4
|
||||||
|
|
||||||
|
- **"First dispatch under 30 seconds" is a new end-to-end check**, since this repo's Phase 12 had no such target. The balance simulator has no screens, so a welcome can't slow it. The new e2e test times a real start, from "Start your company" through Skip to the first tutorial run in flight, against 30 seconds.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -497,4 +497,6 @@ Spec: `memory-bank/change-requests/CR-022-welcome-screens.md` (received as "CR-0
|
||||||
|
|
||||||
Tests (`apps/web/test/welcome.test.tsx`): through all three cards to "Let's fly", marked seen, on Contracts with the intro card; Skip on each card does the same; no welcome after a reload; the slide class only without reduced motion; focus stays inside. `packages/engine/test/start.test.ts`: `markWelcomeSeen` records it, and it survives a reload.
|
Tests (`apps/web/test/welcome.test.tsx`): through all three cards to "Let's fly", marked seen, on Contracts with the intro card; Skip on each card does the same; no welcome after a reload; the slide class only without reduced motion; focus stays inside. `packages/engine/test/start.test.ts`: `markWelcomeSeen` records it, and it survives a reload.
|
||||||
- [x] **Step 22.3 — Client: new company and "How to play".** "Start a new company" makes a save whose welcome is unseen, so the gate shows the cards for it. The gate's "closed" flag is now kept per company id, so a welcome closed earlier in the session doesn't hide the new company's. Settings → Help has "How to play", which opens `WelcomeCards` ending in "Close" and leaves the save alone. Tests (`apps/web/test/welcome-settings.test.tsx`): after skipping one company's welcome, a company started from Settings shows card 1 again; How to play opens anywhere, ends in Close (not "Let's fly"), stays on Settings and never calls `markWelcomeSeen`.
|
- [x] **Step 22.3 — Client: new company and "How to play".** "Start a new company" makes a save whose welcome is unseen, so the gate shows the cards for it. The gate's "closed" flag is now kept per company id, so a welcome closed earlier in the session doesn't hide the new company's. Settings → Help has "How to play", which opens `WelcomeCards` ending in "Close" and leaves the save alone. Tests (`apps/web/test/welcome-settings.test.tsx`): after skipping one company's welcome, a company started from Settings shows card 1 again; How to play opens anywhere, ends in Close (not "Let's fly"), stays on Settings and never calls `markWelcomeSeen`.
|
||||||
- [ ] Step 22.4 — Regression
|
- [x] **Step 22.4 — Regression.** New e2e `apps/web/e2e/22-4-first-dispatch.e2e.ts`: from "Start your company", through Skip on the welcome, to the first tutorial run in flight takes under 30 seconds. Full suite: typecheck, lint, 1414 unit tests and 10 e2e tests pass.
|
||||||
|
|
||||||
|
**Phase 22 is complete; stopped for review.** Manual check for the user: start a new company on a phone and read through the three cards (Next, swipe, Skip), then check Settings → Help → How to play.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue