Verify final camp routes to ending

This commit is contained in:
2026-07-05 18:42:34 +09:00
parent 341388c6ca
commit 83adf11458

View File

@@ -279,11 +279,18 @@ try {
await waitForCamp(page);
const finalCampState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
assert(finalCampState?.campaign?.step === 'sixty-sixth-camp', `Expected final camp save to continue: ${JSON.stringify(finalCampState)}`);
assert(finalCampState.sortieHasBattle === false, `Expected final camp to expose no playable sortie target: ${JSON.stringify(finalCampState)}`);
assert(finalCampState.nextSortieBattleId === null, `Expected final camp to route to ending instead of a battle: ${JSON.stringify(finalCampState)}`);
assert(
Array.isArray(finalCampState.sortieDeploymentPreview) && finalCampState.sortieDeploymentPreview.length === 0,
`Expected final camp deployment preview to stay empty: ${JSON.stringify(finalCampState?.sortieDeploymentPreview)}`
);
await page.screenshot({ path: `${screenshotDir}/rc-final-camp.png`, fullPage: true });
await assertCanvasPainted(page, 'final camp');
await page.mouse.click(1160, 38);
const finalTransitionScenes = await waitForStoryOrEnding(page);
assert(!finalTransitionScenes.includes('BattleScene'), `Expected final camp transition to avoid BattleScene: ${JSON.stringify(finalTransitionScenes)}`);
if (finalTransitionScenes.includes('StoryScene')) {
await waitForStoryReady(page);
await advanceStoryUntilEnding(page);