diff --git a/docs_build/dev/reports/codex_changed_files.txt b/docs_build/dev/reports/codex_changed_files.txt index 60d4cdf24..af8e89c91 100644 --- a/docs_build/dev/reports/codex_changed_files.txt +++ b/docs_build/dev/reports/codex_changed_files.txt @@ -1,125 +1,64 @@ -PR_26171_ALPHA_047-game-hub-canonical-path-journey-handoff - -Git workflow: -- Current branch: pr/26171-ALPHA-047-game-hub-canonical-path-journey-handoff -- Created branch: pr/26171-ALPHA-047-game-hub-canonical-path-journey-handoff -- Push result: PASS; pushed to origin/pr/26171-ALPHA-047-game-hub-canonical-path-journey-handoff -- PR URL: https://github.com/ToolboxAid/HTML-JavaScript-Gaming/pull/32 -- Merge approval status: pending explicit Team Alpha owner approval -- Merge result: not performed; merge is blocked until explicit Team Alpha owner approval -- Rebase/conflict resolution: PASS; rebased onto origin/main at e8845dae6 after GitHub reported the branch was behind current main. Conflicts were limited to generated Codex report artifacts and reports were regenerated. -- Latest rebase/conflict resolution: PASS; rebased onto origin/main at 195c90a64 after PR_26171_BETA_075 landed. Conflicts were resolved in generated Codex report artifacts and tests/playwright/tools/RootToolsFutureState.spec.mjs; the test expectations now preserve current-main Text To Speech coverage and ALPHA_047 canonical game-hub route/filter behavior. -- Final approved rebase: PASS; Team Alpha approval granted for ALPHA_047, rebased onto origin/main at 1451a1173, with conflicts limited to generated Codex report artifacts. +PR_26171_ALPHA_048-idea-project-journey-execution-flow Instruction compliance: -- PASS: docs_build/dev/PROJECT_INSTRUCTIONS.md was read before file changes. -- PASS: docs_build/dev/PROJECT_MULTI_PC.txt was read before file changes. +- PASS: docs_build/dev/PROJECT_INSTRUCTIONS.md was read before implementation. +- PASS: docs_build/dev/PROJECT_MULTI_PC.txt was read before implementation. - PASS: BUILD_PR.md was created and read before implementation. -- PASS: Team Alpha owner scope applies to Game Hub, Game Journey handoff, and Idea Board continuity. +- PASS: Branch was created from clean main after ALPHA_047 was merged and main was pulled to a0da3ad30. +- PASS: PR TEAM owner applies to Idea Board, Game Hub, and Game Journey. - PASS: Full samples smoke was not run. +Git workflow: +- Current branch: pr/26171-ALPHA-048-idea-project-journey-execution-flow +- Created branch: pr/26171-ALPHA-048-idea-project-journey-execution-flow +- Clean status: PASS after final amendment +- Push result: PASS; pushed pr/26171-ALPHA-048-idea-project-journey-execution-flow to origin +- PR URL: https://github.com/ToolboxAid/HTML-JavaScript-Gaming/pull/41 +- Merge approval status: pending explicit Team Alpha owner approval; PR is open and mergeable +- Merge result: not performed; do not merge without explicit Team Alpha owner approval + Validation: -- PASS: node --check toolbox/game-hub/game-hub.js -- PASS: node --check toolbox/game-hub/game-hub-api-client.js -- PASS: node --check toolbox/idea-board/index.js -- PASS: node --check toolbox/game-journey/game-journey.js -- PASS: node --check src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js -- PASS: node --check src/dev-runtime/server/local-api-router.mjs -- PASS: node --check tests/playwright/tools/GameHubMockRepository.spec.mjs - PASS: node --check tests/playwright/tools/IdeaBoardTableNotes.spec.mjs - PASS: node --check tests/playwright/tools/GameJourneyTool.spec.mjs -- PASS: npx playwright test tests/playwright/tools/GameHubMockRepository.spec.mjs --project=playwright --workers=1 --reporter=line (11 passed) +- PASS: node --check toolbox/idea-board/index.js +- PASS: node --check toolbox/game-hub/game-hub.js +- PASS: node --check toolbox/game-journey/game-journey.js - PASS: npx playwright test tests/playwright/tools/IdeaBoardTableNotes.spec.mjs --project=playwright --workers=1 --reporter=line (2 passed) -- PASS: npx playwright test tests/playwright/tools/GameJourneyTool.spec.mjs --project=playwright --workers=1 --reporter=line --grep "Game Hub hands the active game route to Game Journey|Game Journey requires an active game" (2 passed) +- PASS: npx playwright test tests/playwright/tools/GameHubMockRepository.spec.mjs --project=playwright --workers=1 --reporter=line (11 passed) +- PASS: npx playwright test tests/playwright/tools/GameJourneyTool.spec.mjs --project=playwright --workers=1 --reporter=line --grep "Game Hub hands the active game route to Game Journey" (1 passed) - PASS: npm run test:workspace-v2 (5 passed) -- PASS: git diff --check (line-ending warnings only) -- PASS: Completion revalidation for PR_26171_ALPHA_048 start-gate blocker; ALPHA_047 scoped validation was rerun while still on branch pr/26171-ALPHA-047-game-hub-canonical-path-journey-handoff, and ALPHA_048 implementation was not started. -- PASS: Latest post-rebase validation after origin/main 195c90a64: syntax checks, targeted Game Hub Playwright, targeted Idea Board Playwright, targeted Game Journey handoff Playwright, and npm run test:workspace-v2. -- PASS: Final approved validation after origin/main 1451a1173: syntax checks, targeted Game Hub Playwright, targeted Idea Board Playwright, targeted Game Journey handoff Playwright, and npm run test:workspace-v2. Requirement-by-requirement evidence: -- PASS: Rename active path toolbox/game-workspace/ to toolbox/game-hub/. -- PASS: Rename active game-workspace.js to game-hub.js. -- PASS: Rename active game-workspace-api-client.js to game-hub-api-client.js. -- PASS: Deep-audit and update imports, variables, data attributes, tests, toolbox navigation/registry, tool display mode slug, page titles, and creator-facing labels to Game Hub. -- PASS: Do not leave active navigation pointing to toolbox/game-workspace; active route audit found no active legacy route. -- PASS: Do not create duplicate active Game Hub paths; registry reads filter stale game-workspace rows and active metadata points to game-hub. -- PASS: Idea Board Create Project creates/links a Game Hub project when a Ready idea becomes Project. -- PASS: Project ideas lock original Idea, Pitch, and Notes. -- PASS: Game Hub shows Source Idea/Pitch/Notes as read-only creator-facing content. -- PASS: Game Journey receives executable Journey items from Idea notes when the linked project opens. +- PASS: Ready Idea -> Create Project -> Game Hub -> Game Journey flow remains wired through the existing shared Game Hub project contract. +- PASS: Create Project appears only for Ready ideas; the targeted Idea Board test verifies the Ready row action sequence. +- PASS: Clicking Create Project creates or links a Game Hub project and sets the Idea status to Project. +- PASS: Project ideas lock original Idea, Pitch, and Notes as read-only; targeted Idea Board coverage verifies no Edit/Delete/Add Note/note actions after Project status. +- PASS: Project actions become Open in Game Hub and Archive. +- PASS: Game Hub displays read-only Source Idea, Pitch, and Notes for the linked project. +- PASS: Game Hub exposes the creator-facing action as Open Journey. +- PASS: Open Journey navigates to the related Game Journey project route. +- PASS: Game Journey receives an editable Journey item generated from the Idea note. +- PASS: Targeted Idea Board coverage edits the generated Journey item and confirms the Source Idea note remains unchanged. - PASS: Original Idea notes are not mutated or moved. -- PASS: Project/source-linked actions avoid Delete and use Open in Game Hub plus Archive. -- PASS: No real database migration was added; existing shared mock/server contracts are reused. -- PASS: Merge is not performed without explicit Team Alpha owner approval. +- PASS: No real database persistence or schema work was added. + +ZIP: +- Path: tmp/PR_26171_ALPHA_048-idea-project-journey-execution-flow_delta.zip +- Size: 191263 bytes +- Contents: + - docs_build/dev/reports/codex_changed_files.txt + - docs_build/dev/reports/codex_review.diff + - docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/APPLY_PR.md + - docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/BUILD_PR.md + - docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/PLAN_PR.md + - tests/playwright/tools/GameJourneyTool.spec.mjs + - tests/playwright/tools/IdeaBoardTableNotes.spec.mjs + - toolbox/game-hub/index.html Changed files: -- deleted: assets/theme-v2/images/badges/game-workspace-1024.png -- deleted: assets/theme-v2/images/badges/game-workspace.png -- added: assets/theme-v2/images/badges/game-hub-1024.png -- added: assets/theme-v2/images/badges/game-hub.png -- deleted: assets/theme-v2/images/tools/game-workspace-1024.png -- deleted: assets/theme-v2/images/tools/game-workspace.png -- added: assets/theme-v2/images/tools/game-hub-1024.png -- added: assets/theme-v2/images/tools/game-hub.png -- updated: assets/theme-v2/js/account-achievements.js -- updated: assets/theme-v2/js/gamefoundry-partials.js -- updated: assets/theme-v2/partials/header-nav.html -- updated: docs_build/database/ddl/game-workspace.sql -- updated: docs_build/database/dml/DML_INDEX.md -- updated: docs_build/database/dml/game-workspace.sql -- updated: docs_build/database/seed/game-workspace.json -- updated: docs_build/database/seed/guest/game-workspace.json -- updated: docs_build/dev/admin-notes/deployment-uat-prod/index.txt -- added: docs_build/dev/reports/codex_changed_files.txt -- added: docs_build/dev/reports/codex_review.diff -- added: docs_build/pr/PR_26171_ALPHA_047-game-hub-canonical-path-journey-handoff/APPLY_PR.md -- added: docs_build/pr/PR_26171_ALPHA_047-game-hub-canonical-path-journey-handoff/BUILD_PR.md -- added: docs_build/pr/PR_26171_ALPHA_047-game-hub-canonical-path-journey-handoff/PLAN_PR.md -- deleted: learn/game-workspace/index.html -- added: learn/game-hub/index.html -- updated: learn/getting-started/index.html -- updated: learn/index.html -- updated: package.json -- updated: scripts/run-targeted-test-lanes.mjs -- updated: scripts/validate-browser-env-agnostic.mjs -- updated: scripts/validate-local-postgres-runtime.mjs -- updated: src/dev-runtime/admin/header-nav.local.html -- updated: src/dev-runtime/persistence/mock-db-store.js -- updated: src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js -- updated: src/dev-runtime/seed/server-seed-loader.mjs -- updated: src/dev-runtime/server/local-api-router.mjs -- updated: src/shared/toolbox/tool-metadata-inventory.js -- updated: tests/dev-runtime/DevRuntimeBoundary.test.mjs -- updated: tests/dev-runtime/ProductDataProviderContractHardening.test.mjs -- updated: tests/dev-runtime/SupabaseProductDataCutover.test.mjs -- updated: tests/playwright/account/AchievementsPage.spec.mjs -- updated: tests/playwright/tools/AdminDbViewer.spec.mjs -- added: tests/playwright/tools/GameHubMockRepository.spec.mjs +- added: docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/APPLY_PR.md +- added: docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/BUILD_PR.md +- added: docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/PLAN_PR.md - updated: tests/playwright/tools/GameJourneyTool.spec.mjs -- deleted: tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs - updated: tests/playwright/tools/IdeaBoardTableNotes.spec.mjs -- updated: tests/playwright/tools/RootToolsFutureState.spec.mjs -- updated: tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs -- updated: tests/playwright/tools/ToolImageRegistry.spec.mjs -- updated: tests/playwright/tools/ToolNavigationPrevNext.spec.mjs -- updated: tests/playwright/tools/ToolboxRoutePages.spec.mjs -- updated: toolbox/colors/index.html -- updated: toolbox/controls/controls.js -- updated: toolbox/controls/index.html -- updated: toolbox/game-design/index.html -- added: toolbox/game-hub/game-hub-api-client.js -- added: toolbox/game-hub/game-hub.js -- added: toolbox/game-hub/index.html -- updated: toolbox/game-journey/game-journey.js -- deleted: toolbox/game-workspace/game-workspace-api-client.js -- deleted: toolbox/game-workspace/game-workspace.js -- deleted: toolbox/game-workspace/index.html -- updated: toolbox/idea-board/index.js -- updated: toolbox/project-workspace/index.html -- updated: toolbox/tools-page-accordions.js - -ZIP: -- Path: tmp/PR_26171_ALPHA_047-game-hub-canonical-path-journey-handoff_delta.zip -- Size: generated after branch push; final byte size is reported in the delivery response because the ZIP is not committed. -- Contents: repo-structured scoped delta files. Deleted legacy paths are documented in the changed-files list and are not represented as physical files in the archive. +- updated: toolbox/game-hub/index.html diff --git a/docs_build/dev/reports/codex_review.diff b/docs_build/dev/reports/codex_review.diff index 9b7b02d87..fe31ed50f 100644 Binary files a/docs_build/dev/reports/codex_review.diff and b/docs_build/dev/reports/codex_review.diff differ diff --git a/docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/APPLY_PR.md b/docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/APPLY_PR.md new file mode 100644 index 000000000..8132731e8 --- /dev/null +++ b/docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/APPLY_PR.md @@ -0,0 +1,55 @@ +# PR_26171_ALPHA_048-idea-project-journey-execution-flow APPLY + +## Git Workflow +- Current branch: `pr/26171-ALPHA-048-idea-project-journey-execution-flow` +- Created branch: `pr/26171-ALPHA-048-idea-project-journey-execution-flow` +- Push result: PASS; pushed `pr/26171-ALPHA-048-idea-project-journey-execution-flow` to origin. +- PR URL: https://github.com/ToolboxAid/HTML-JavaScript-Gaming/pull/41 +- Merge approval status: pending explicit Team Alpha owner approval; PR is open and mergeable. +- Merge result: not performed; do not merge without explicit Team Alpha owner approval. + +## Validation +- PASS: `node --check tests/playwright/tools/IdeaBoardTableNotes.spec.mjs` +- PASS: `node --check tests/playwright/tools/GameJourneyTool.spec.mjs` +- PASS: `node --check toolbox/idea-board/index.js` +- PASS: `node --check toolbox/game-hub/game-hub.js` +- PASS: `node --check toolbox/game-journey/game-journey.js` +- PASS: `npx playwright test tests/playwright/tools/IdeaBoardTableNotes.spec.mjs --project=playwright --workers=1 --reporter=line` (2 passed) +- PASS: `npx playwright test tests/playwright/tools/GameHubMockRepository.spec.mjs --project=playwright --workers=1 --reporter=line` (11 passed) +- PASS: `npx playwright test tests/playwright/tools/GameJourneyTool.spec.mjs --project=playwright --workers=1 --reporter=line --grep "Game Hub hands the active game route to Game Journey"` (1 passed) +- PASS: `npm run test:workspace-v2` (5 passed) + +## ZIP +- Path: `tmp/PR_26171_ALPHA_048-idea-project-journey-execution-flow_delta.zip` +- Size: 191263 bytes +- Contents: + - `docs_build/dev/reports/codex_changed_files.txt` + - `docs_build/dev/reports/codex_review.diff` + - `docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/APPLY_PR.md` + - `docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/BUILD_PR.md` + - `docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/PLAN_PR.md` + - `tests/playwright/tools/GameJourneyTool.spec.mjs` + - `tests/playwright/tools/IdeaBoardTableNotes.spec.mjs` + - `toolbox/game-hub/index.html` + +## Requirement Evidence +- Instruction compliance: PASS; PROJECT_INSTRUCTIONS.md and PROJECT_MULTI_PC.txt were read before implementation. +- Team Alpha owner: PASS; scope is Idea, Game Hub, and Game Journey. +- Branch gate: PASS; branch was created from clean `main` after ALPHA_047 merged. +- PASS: Ready Idea -> Create Project -> Game Hub -> Game Journey flow remains wired through the existing shared Game Hub project contract. +- PASS: Create Project remains available only for Ready ideas; targeted Idea Board Playwright verifies Ready action state before creation. +- PASS: Clicking Create Project creates or links a Game Hub project, sets the idea to Project, locks the Idea/Pitch/Notes, and shows Open in Game Hub plus Archive. +- PASS: Game Hub displays read-only Source Idea, Pitch, and Notes for the linked project. +- PASS: Game Hub now exposes the creator action as `Open Journey`. +- PASS: Game Journey receives an editable item generated from the Idea note; targeted Idea Board Playwright edits the generated Journey item after handoff. +- PASS: Original Idea notes are not mutated or moved; targeted Idea Board Playwright confirms the Game Hub Source Idea note remains unchanged after editing the Journey item. +- PASS: No real database persistence or schema work was added. +- PASS: Full samples smoke was not run. + +## Changed Files +- added: `docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/APPLY_PR.md` +- added: `docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/BUILD_PR.md` +- added: `docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/PLAN_PR.md` +- updated: `tests/playwright/tools/GameJourneyTool.spec.mjs` +- updated: `tests/playwright/tools/IdeaBoardTableNotes.spec.mjs` +- updated: `toolbox/game-hub/index.html` diff --git a/docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/BUILD_PR.md b/docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/BUILD_PR.md new file mode 100644 index 000000000..7938ec804 --- /dev/null +++ b/docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/BUILD_PR.md @@ -0,0 +1,51 @@ +# PR_26171_ALPHA_048-idea-project-journey-execution-flow BUILD + +## Start Gate +- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`. +- Read `docs_build/dev/PROJECT_MULTI_PC.txt`. +- Confirm current branch is clean latest `main` before branch creation. +- Confirm Team Alpha owns Idea, Game Hub, and Game Journey work. +- Confirm `toolbox/game-hub/` exists on `main`. +- Confirm merge requires explicit Team Alpha owner approval. + +## Exact Targets +- `toolbox/idea-board/index.js` +- `toolbox/game-hub/game-hub.js` +- `toolbox/game-journey/game-journey.js` +- `src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js` +- Targeted Playwright tests for Idea Board, Game Hub, and Game Journey flow +- `docs_build/dev/reports/codex_review.diff` +- `docs_build/dev/reports/codex_changed_files.txt` + +## Required Implementation +- Create Project appears only for Ready ideas. +- Clicking Create Project: + - creates or links a Game Hub project, + - sets Idea status to Project, + - locks original Idea, Pitch, and Notes as read-only, + - changes actions to Open in Game Hub and Archive, + - creates editable Game Journey Items from Idea Notes. +- Do not mutate or move original Idea Notes. +- Game Hub displays read-only Source Idea: + - Idea + - Pitch + - Notes +- Add Open Journey action from Game Hub where appropriate. +- Keep creator-facing production copy only. + +## Required Validation +- `node --check` for changed JS files. +- Targeted Idea Board Playwright. +- Targeted Game Hub Playwright. +- Targeted Game Journey Playwright. +- `npm run test:workspace-v2`. +- Do not run full samples smoke. + +## Required Delivery +- Update required reports. +- Produce repo-structured ZIP under `tmp/PR_26171_ALPHA_048-idea-project-journey-execution-flow_delta.zip`. +- Stage only scoped files. +- Commit. +- Push branch. +- Create PR. +- Stop before merge until explicit Team Alpha owner approval is present. diff --git a/docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/PLAN_PR.md b/docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/PLAN_PR.md new file mode 100644 index 000000000..cde8258b4 --- /dev/null +++ b/docs_build/pr/PR_26171_ALPHA_048-idea-project-journey-execution-flow/PLAN_PR.md @@ -0,0 +1,25 @@ +# PR_26171_ALPHA_048-idea-project-journey-execution-flow PLAN + +## Purpose +Wire the creator execution flow from a Ready Idea through Game Hub into editable Game Journey items. + +## Source of Truth +- `docs_build/dev/PROJECT_INSTRUCTIONS.md` +- `docs_build/dev/PROJECT_MULTI_PC.txt` + +## Team Ownership +- Team Alpha owns Idea, Game Hub, and Game Journey work. + +## Scope +- Ready Idea -> Create Project -> Game Hub -> Game Journey. +- Project and Archived Idea locking remains read-only for Idea, Pitch, and Notes. +- Game Hub displays Source Idea/Pitch/Notes read-only. +- Game Journey receives editable Journey Items generated from Idea Notes. +- Original Idea Notes are not mutated or moved. +- Add Open Journey action from Game Hub where appropriate. + +## Out of Scope +- Game Journey image wiring. +- Game Hub table polish unrelated to execution flow. +- Real database persistence or schema changes. +- Full samples smoke. diff --git a/tests/playwright/tools/GameJourneyTool.spec.mjs b/tests/playwright/tools/GameJourneyTool.spec.mjs index 429f6f381..7a0f87f53 100644 --- a/tests/playwright/tools/GameJourneyTool.spec.mjs +++ b/tests/playwright/tools/GameJourneyTool.spec.mjs @@ -1457,7 +1457,7 @@ test("Game Hub hands the active game route to Game Journey", async ({ page }) => const failures = await openRepoPage(page, "/toolbox/game-hub/index.html"); try { - const journeyLink = page.getByRole("link", { name: "Open Game Journey" }); + const journeyLink = page.getByRole("link", { name: "Open Journey" }); await expect(journeyLink).toHaveAttribute("href", /toolbox\/game-journey\/index\.html\?game=demo-game$/); await journeyLink.click(); await page.waitForURL(/toolbox\/game-journey\/index\.html\?game=demo-game$/); diff --git a/tests/playwright/tools/IdeaBoardTableNotes.spec.mjs b/tests/playwright/tools/IdeaBoardTableNotes.spec.mjs index 934faf46f..4eb6de548 100644 --- a/tests/playwright/tools/IdeaBoardTableNotes.spec.mjs +++ b/tests/playwright/tools/IdeaBoardTableNotes.spec.mjs @@ -354,12 +354,28 @@ test("Idea Board uses accordion table ideas and notes", async ({ page }) => { await expect(page.locator("[data-source-idea-notes]")).toContainText("Use dusk tide changes as the first Game Hub planning note."); await expect(page.getByRole("button", { name: "Delete Open Game" })).toHaveCount(0); await expect(page.locator("main")).not.toContainText(/\bproject records\b|\bAPI\b|\bDB\b|\bmock\b|\bseed\b|\bdebug\b|\binternal\b/i); - await page.getByRole("link", { name: "Open Game Journey" }).click(); + const createdProjectUrl = page.url(); + await page.getByRole("link", { name: "Open Journey" }).click(); await page.waitForURL(/\/toolbox\/game-journey\/index\.html\?game=lantern-reef-\d+$/); await expect(page.locator("[data-journey-active-game]")).toHaveText("Active game: Lantern Reef."); await expect(page.locator("[data-journey-summary-body]")).toContainText("Source Idea: Lantern Reef"); await expect(page.locator("[data-journey-summary-body]")).toContainText("10000011"); await expect(page.locator("[data-journey-recent-activity]")).toContainText("Created 1 Game Journey item from Source Idea."); + await page.locator("[data-journey-note-button]", { hasText: "Source Idea: Lantern Reef" }).click(); + const generatedJourneyItem = page.locator("[data-journey-item-button]", { hasText: "Use dusk tide changes as the first Game Hub planning note." }).first(); + await expect(generatedJourneyItem).toBeVisible(); + await generatedJourneyItem.click(); + await expect(page.locator("[data-journey-editor-status]")).toContainText("User-created item"); + await expect(page.locator("[data-journey-title-input]")).toBeEnabled(); + await page.locator("[data-journey-title-input]").fill("Refine dusk tide puzzle loop"); + await page.locator("[data-journey-item-details-input]").fill("Keep this as an editable journey planning item."); + await page.getByLabel("Status").selectOption("in-progress"); + await page.getByRole("button", { name: "Update Item" }).click(); + await expect(page.locator("[data-journey-item-tree]")).toContainText("Refine dusk tide puzzle loop"); + await expect(page.locator("[data-journey-item-tree]")).toContainText("Keep this as an editable journey planning item."); + await page.goto(createdProjectUrl, { waitUntil: "networkidle" }); + await expect(page.locator("[data-source-idea-notes]")).toContainText("Use dusk tide changes as the first Game Hub planning note."); + await expect(page.locator("[data-source-idea-notes]")).not.toContainText("Refine dusk tide puzzle loop"); expect(mutatingApiRequests.some((request) => request.includes("/api/toolbox/game-hub/repositories"))).toBe(true); expect(mutatingApiRequests.some((request) => request.includes("/methods/createGame"))).toBe(true); diff --git a/toolbox/game-hub/index.html b/toolbox/game-hub/index.html index ef7b50004..347861b11 100644 --- a/toolbox/game-hub/index.html +++ b/toolbox/game-hub/index.html @@ -97,7 +97,7 @@