Skip to content

Commit b4d18b6

Browse files
committed
PR_26171_005 Game Journey tool integration foundation
1 parent 6423154 commit b4d18b6

4 files changed

Lines changed: 135 additions & 0 deletions

File tree

src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,87 @@ export const GAME_JOURNEY_SUGGESTED_TOOLS = Object.freeze({
162162
}),
163163
});
164164

165+
export const GAME_JOURNEY_TOOL_OWNERSHIP_AREAS = Object.freeze([
166+
Object.freeze({
167+
sectionKey: "idea",
168+
sectionName: "Idea",
169+
ownershipArea: "Concept planning",
170+
toolNames: Object.freeze(["Idea Board", "Creator Learning", "AI Command Center"]),
171+
}),
172+
Object.freeze({
173+
sectionKey: "design",
174+
sectionName: "Design",
175+
ownershipArea: "Game structure",
176+
toolNames: Object.freeze(["Game Design", "Game Configuration", "Game Hub", "Game Crew", "Tags"]),
177+
}),
178+
Object.freeze({
179+
sectionKey: "graphics",
180+
sectionName: "Graphics",
181+
ownershipArea: "Visual asset planning",
182+
toolNames: Object.freeze(["Assets", "Colors", "Sprites", "Animations", "Particles", "Videos"]),
183+
}),
184+
Object.freeze({
185+
sectionKey: "audio",
186+
sectionName: "Audio",
187+
ownershipArea: "Sound and voice planning",
188+
toolNames: Object.freeze(["Audio", "Music", "Audio Effects", "MIDI", "Voice Capture", "Voice Output"]),
189+
}),
190+
Object.freeze({
191+
sectionKey: "objects",
192+
sectionName: "Objects",
193+
ownershipArea: "Interactive things",
194+
toolNames: Object.freeze(["Objects", "Characters"]),
195+
}),
196+
Object.freeze({
197+
sectionKey: "worlds",
198+
sectionName: "Worlds",
199+
ownershipArea: "Places and levels",
200+
toolNames: Object.freeze(["Worlds", "Environments"]),
201+
}),
202+
Object.freeze({
203+
sectionKey: "interface",
204+
sectionName: "Interface",
205+
ownershipArea: "Player screens",
206+
toolNames: Object.freeze(["Fonts", "Languages", "Messages"]),
207+
}),
208+
Object.freeze({
209+
sectionKey: "controls",
210+
sectionName: "Controls",
211+
ownershipArea: "Player input",
212+
toolNames: Object.freeze(["Controls", "Input Mapping V2", "Hitboxes"]),
213+
}),
214+
Object.freeze({
215+
sectionKey: "rules",
216+
sectionName: "Rules",
217+
ownershipArea: "Gameplay behavior",
218+
toolNames: Object.freeze(["Events", "Custom Extensions"]),
219+
}),
220+
Object.freeze({
221+
sectionKey: "progression",
222+
sectionName: "Progression",
223+
ownershipArea: "Rewards and advancement",
224+
toolNames: Object.freeze(["Achievements", "Saved Data", "Game Journey"]),
225+
}),
226+
Object.freeze({
227+
sectionKey: "play-test",
228+
sectionName: "Play Test",
229+
ownershipArea: "Testing and tuning",
230+
toolNames: Object.freeze(["Game Testing", "Debug", "Performance"]),
231+
}),
232+
Object.freeze({
233+
sectionKey: "publish",
234+
sectionName: "Publish",
235+
ownershipArea: "Release readiness",
236+
toolNames: Object.freeze(["Publish", "Build Game", "Platform Settings", "Game Migration"]),
237+
}),
238+
Object.freeze({
239+
sectionKey: "share",
240+
sectionName: "Share",
241+
ownershipArea: "Audience and community",
242+
toolNames: Object.freeze(["Marketplace", "Community", "Ratings", "Cloud"]),
243+
}),
244+
]);
245+
165246
function clone(value) {
166247
return JSON.parse(JSON.stringify(value));
167248
}

src/dev-runtime/server/local-api-router.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ import {
6969
GAME_JOURNEY_STATUS_BY_ID,
7070
GAME_JOURNEY_STATUSES,
7171
GAME_JOURNEY_SUGGESTED_TOOLS,
72+
GAME_JOURNEY_TOOL_OWNERSHIP_AREAS,
7273
createGameJourneyMockRepository,
7374
} from "../persistence/tool-repositories/game-journey-mock-repository.js";
7475
import {
@@ -5115,6 +5116,7 @@ LIMIT 1;
51155116
GAME_JOURNEY_STATUS_BY_ID,
51165117
GAME_JOURNEY_STATUSES,
51175118
GAME_JOURNEY_SUGGESTED_TOOLS,
5119+
GAME_JOURNEY_TOOL_OWNERSHIP_AREAS,
51185120
};
51195121
}
51205122
if (toolId === "palette" || toolId === "colors") {

tests/playwright/tools/GameJourneyTool.spec.mjs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
GAME_JOURNEY_KEYS,
1010
GAME_JOURNEY_STATUS_BY_ID,
1111
GAME_JOURNEY_STATUSES,
12+
GAME_JOURNEY_TOOL_OWNERSHIP_AREAS,
1213
createGameJourneyMockRepository,
1314
} from "../../../src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js";
1415
import { MOCK_DB_KEYS, getStandaloneMockDbSeedTables } from "../../../src/dev-runtime/persistence/mock-db-store.js";
@@ -101,6 +102,44 @@ function statusLabel(statusId) {
101102
return status ? `${status.icon} ${status.label}` : statusId;
102103
}
103104

105+
function expectStaticToolOwnershipAreas(areas) {
106+
expect(areas.map((area) => area.sectionName)).toEqual([
107+
"Idea",
108+
"Design",
109+
"Graphics",
110+
"Audio",
111+
"Objects",
112+
"Worlds",
113+
"Interface",
114+
"Controls",
115+
"Rules",
116+
"Progression",
117+
"Play Test",
118+
"Publish",
119+
"Share",
120+
]);
121+
expect(areas.every((area) => area.sectionKey && area.ownershipArea && area.toolNames.length > 0)).toBe(true);
122+
expect(areas.flatMap((area) => area.toolNames)).toEqual(expect.arrayContaining([
123+
"Idea Board",
124+
"Game Design",
125+
"Assets",
126+
"Audio",
127+
"Objects",
128+
"Worlds",
129+
"Controls",
130+
"Events",
131+
"Game Journey",
132+
"Game Testing",
133+
"Publish",
134+
"Community",
135+
]));
136+
expect(areas.flatMap((area) => Object.keys(area))).not.toEqual(expect.arrayContaining([
137+
"plannedCount",
138+
"completedCount",
139+
"percentComplete",
140+
]));
141+
}
142+
104143
async function visibleTreeStatuses(page) {
105144
return page.locator("[data-journey-item-button]").evaluateAll((buttons) =>
106145
buttons.map((button) => button.dataset.journeyItemStatus),
@@ -146,6 +185,18 @@ async function expectFilteredSummaryRows(page, statusId, expectedRows) {
146185
});
147186
}
148187

188+
test("Game Journey exposes static tool ownership areas without automatic counts", async () => {
189+
expectStaticToolOwnershipAreas(GAME_JOURNEY_TOOL_OWNERSHIP_AREAS);
190+
191+
const server = await startRepoServer();
192+
try {
193+
const constants = await fetchApiData(server, "/api/toolbox/game-journey/constants");
194+
expectStaticToolOwnershipAreas(constants.GAME_JOURNEY_TOOL_OWNERSHIP_AREAS);
195+
} finally {
196+
await server.close();
197+
}
198+
});
199+
149200
async function closeWithCoverage(page, failures) {
150201
await workspaceV2CoverageReporter.stop(page);
151202
await failures.server.close();

toolbox/game-journey/game-journey-api-client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const GAME_JOURNEY_KEYS = Object.freeze(requireServerConstant(constants,
1414
export const GAME_JOURNEY_STATUS_BY_ID = Object.freeze(requireServerConstant(constants, "GAME_JOURNEY_STATUS_BY_ID", "game-journey"));
1515
export const GAME_JOURNEY_STATUSES = Object.freeze(requireServerConstant(constants, "GAME_JOURNEY_STATUSES", "game-journey"));
1616
export const GAME_JOURNEY_SUGGESTED_TOOLS = Object.freeze(requireServerConstant(constants, "GAME_JOURNEY_SUGGESTED_TOOLS", "game-journey"));
17+
export const GAME_JOURNEY_TOOL_OWNERSHIP_AREAS = Object.freeze(requireServerConstant(constants, "GAME_JOURNEY_TOOL_OWNERSHIP_AREAS", "game-journey"));
1718

1819
export function createGameJourneyApiRepository(options = {}) {
1920
return createServerRepositoryClient("game-journey", options);

0 commit comments

Comments
 (0)