test: align release gates with canonical campaign saves

This commit is contained in:
2026-07-28 17:46:53 +09:00
parent 8a6c8c2cd7
commit 8cd7dd7eec
4 changed files with 11 additions and 6 deletions

View File

@@ -169,7 +169,7 @@ assert(
'Both victory result routes must clear their persisted aftermath marker only when CampScene is reached'
);
assert(
campaignStateSource.includes('state.pendingAftermathBattleId = battleId as BattleScenarioId') &&
/state\.pendingAftermathBattleId\s*=\s*battleId as BattleScenarioId/.test(campaignStateSource) &&
campaignStateSource.includes('export function completeCampaignAftermath'),
'Campaign saves must persist a pending victory aftermath and expose an explicit completion transition'
);

View File

@@ -43,7 +43,7 @@ for (const scriptPath of automatedBrowserChecks) {
const source = readFileSync(scriptPath, 'utf8');
assert(source.includes("from './desktop-browser-viewport.mjs'"), `${scriptPath} must import the shared browser viewport`);
assert(
/\b(?:newPage|newContext)\(desktopBrowserContextOptions\)/.test(source),
/\b(?:newPage|newContext)\(\s*desktopBrowserContextOptions\s*\)/.test(source),
`${scriptPath} must explicitly create its primary browser page or context with the shared FHD context options`
);
assert(

View File

@@ -485,7 +485,12 @@ function verifyCampaignRoundTrip(
raw.battleHistory[
memoryModule.firstBattleCamaraderieSourceBattleId
].sortieCooperation.bondId = 'ghost-bond';
storage.set(campaignModule.campaignStorageKey, JSON.stringify(raw));
const corruptedSave = JSON.stringify(raw);
storage.set(campaignModule.campaignStorageKey, corruptedSave);
storage.set(
`${campaignModule.campaignStorageKey}:slot-${raw.activeSaveSlot ?? 1}`,
corruptedSave
);
campaign = campaignModule.loadCampaignState();
assert(
campaign.firstBattleReport?.sortieCooperation === undefined &&

View File

@@ -397,11 +397,11 @@ async function verifyCampExplorationWiring(memoryModule, visitModule) {
'An incomplete first-pursuit visit must lead to the walkable camp exploration scene.'
);
assert(
explorationSource.includes(
"completeFirstPursuitScoutVisit(choice.id)"
/completeFirstPursuitScoutVisit\(\s*choice\.id,\s*this\.explorationDialogueCheckpoint\(/.test(
explorationSource
) &&
explorationSource.includes("textureKey: 'exploration-jian-yong'"),
'The exploration scene must use the guarded action and Jian Yong dedicated SD sheet.'
'The exploration scene must atomically use the guarded action with its checkpoint and Jian Yong dedicated SD sheet.'
);
const campaign = createLiteralSyncCampaign(memoryModule);