fix: close presentation rehearsal contract gaps
This commit is contained in:
@@ -3,12 +3,13 @@
|
||||
## Changed Files
|
||||
|
||||
- `web/apps/console/src/presentation/presentation-rehearsal.test.ts`
|
||||
- Added the pure rehearsal storyboard contract.
|
||||
- Verifies all 14 current scene IDs, expected beat counts, and canonical beat IDs.
|
||||
- Added an exact set comparison between `mainScenes` and the expected 14 scene IDs.
|
||||
- Verifies expected beat counts and canonical beat IDs for every scene.
|
||||
- Failure messages identify the missing scene or `scene/beat` pair.
|
||||
- `web/apps/console/src/presentation/PresentationRoute.test.tsx`
|
||||
- Added direct-hash coverage for the nine required routes.
|
||||
- Added direct-hash coverage for the ten intended representative routes, including Scene 8 (`#scene/agent-handoff/request`).
|
||||
- Verifies visible accessible headings and demo-chrome ownership for Scenes 8 through 12.
|
||||
- Uses the presentation footer's accessible action/status surfaces instead of `data-testid` for demo-chrome ownership.
|
||||
- Added no-accidental-chrome coverage for title, problem, architecture, evaluation, and conclusion routes.
|
||||
- Verifies prepared lifecycle assistant-pane ownership, footer ownership, and exactly one run action.
|
||||
|
||||
@@ -24,7 +25,7 @@
|
||||
## Verification
|
||||
|
||||
- `pnpm --dir web/apps/console test -- src/presentation/presentation-rehearsal.test.ts src/presentation/PresentationRoute.test.tsx`
|
||||
- Passed: 2 test files, 67 tests.
|
||||
- Passed: 2 test files, 68 tests.
|
||||
- `pnpm --dir web/apps/console typecheck`
|
||||
- Passed: `tsc -b --pretty false`.
|
||||
- `git diff --check`
|
||||
|
||||
@@ -77,6 +77,11 @@ describe("PresentationRoute", () => {
|
||||
{ hash: "#scene/thesis/title", heading: "Design and Implementation of lda.chat", hasDemoChrome: false },
|
||||
{ hash: "#scene/architecture/client", heading: "Architecture Zoom", hasDemoChrome: false },
|
||||
{ hash: "#scene/authoring/diagnose", heading: "Author, Validate, Repair", hasDemoChrome: false },
|
||||
{
|
||||
hash: "#scene/agent-handoff/request",
|
||||
heading: "What should the workflow author prepare?",
|
||||
hasDemoChrome: true,
|
||||
},
|
||||
{ hash: "#scene/prepared-lifecycle/discover", heading: "Prepared Workflow Lifecycle", hasDemoChrome: true },
|
||||
{ hash: "#scene/run-from-deployment/graph", heading: "Run From Deployment", hasDemoChrome: true },
|
||||
{ hash: "#scene/typed-human-boundary/approval", heading: "Typed Human Boundary", hasDemoChrome: true },
|
||||
@@ -93,8 +98,12 @@ describe("PresentationRoute", () => {
|
||||
render(<PresentationRoute />);
|
||||
|
||||
expect(await screen.findByRole("heading", { name: heading })).toBeInTheDocument();
|
||||
const demoChrome = screen.queryByTestId("presentation-demo-rail");
|
||||
expect(demoChrome !== null).toBe(hasDemoChrome);
|
||||
const footer = screen.getByRole("contentinfo", { name: /presentation footer/i });
|
||||
const action = within(footer).queryByRole("button", {
|
||||
name: /run prepared workflow|play replay walkthrough/i,
|
||||
});
|
||||
const status = within(footer).queryByRole("status");
|
||||
expect(action !== null || status !== null).toBe(hasDemoChrome);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ const expectedBeats = {
|
||||
|
||||
describe("presentation rehearsal storyboard", () => {
|
||||
it("keeps every scene count and canonical beat id aligned with the rehearsal", () => {
|
||||
expect(new Set(mainScenes.map((scene) => scene.id))).toEqual(new Set(Object.keys(expectedBeats)));
|
||||
|
||||
for (const [sceneId, beatIds] of Object.entries(expectedBeats)) {
|
||||
const scene = mainScenes.find((candidate) => candidate.id === sceneId);
|
||||
expect(scene, `missing rehearsal scene ${sceneId}`).toBeDefined();
|
||||
|
||||
Reference in New Issue
Block a user