test: align release gates with canonical campaign saves
This commit is contained in:
@@ -169,7 +169,7 @@ assert(
|
|||||||
'Both victory result routes must clear their persisted aftermath marker only when CampScene is reached'
|
'Both victory result routes must clear their persisted aftermath marker only when CampScene is reached'
|
||||||
);
|
);
|
||||||
assert(
|
assert(
|
||||||
campaignStateSource.includes('state.pendingAftermathBattleId = battleId as BattleScenarioId') &&
|
/state\.pendingAftermathBattleId\s*=\s*battleId as BattleScenarioId/.test(campaignStateSource) &&
|
||||||
campaignStateSource.includes('export function completeCampaignAftermath'),
|
campaignStateSource.includes('export function completeCampaignAftermath'),
|
||||||
'Campaign saves must persist a pending victory aftermath and expose an explicit completion transition'
|
'Campaign saves must persist a pending victory aftermath and expose an explicit completion transition'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ for (const scriptPath of automatedBrowserChecks) {
|
|||||||
const source = readFileSync(scriptPath, 'utf8');
|
const source = readFileSync(scriptPath, 'utf8');
|
||||||
assert(source.includes("from './desktop-browser-viewport.mjs'"), `${scriptPath} must import the shared browser viewport`);
|
assert(source.includes("from './desktop-browser-viewport.mjs'"), `${scriptPath} must import the shared browser viewport`);
|
||||||
assert(
|
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`
|
`${scriptPath} must explicitly create its primary browser page or context with the shared FHD context options`
|
||||||
);
|
);
|
||||||
assert(
|
assert(
|
||||||
|
|||||||
@@ -485,7 +485,12 @@ function verifyCampaignRoundTrip(
|
|||||||
raw.battleHistory[
|
raw.battleHistory[
|
||||||
memoryModule.firstBattleCamaraderieSourceBattleId
|
memoryModule.firstBattleCamaraderieSourceBattleId
|
||||||
].sortieCooperation.bondId = 'ghost-bond';
|
].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();
|
campaign = campaignModule.loadCampaignState();
|
||||||
assert(
|
assert(
|
||||||
campaign.firstBattleReport?.sortieCooperation === undefined &&
|
campaign.firstBattleReport?.sortieCooperation === undefined &&
|
||||||
|
|||||||
@@ -397,11 +397,11 @@ async function verifyCampExplorationWiring(memoryModule, visitModule) {
|
|||||||
'An incomplete first-pursuit visit must lead to the walkable camp exploration scene.'
|
'An incomplete first-pursuit visit must lead to the walkable camp exploration scene.'
|
||||||
);
|
);
|
||||||
assert(
|
assert(
|
||||||
explorationSource.includes(
|
/completeFirstPursuitScoutVisit\(\s*choice\.id,\s*this\.explorationDialogueCheckpoint\(/.test(
|
||||||
"completeFirstPursuitScoutVisit(choice.id)"
|
explorationSource
|
||||||
) &&
|
) &&
|
||||||
explorationSource.includes("textureKey: 'exploration-jian-yong'"),
|
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);
|
const campaign = createLiteralSyncCampaign(memoryModule);
|
||||||
|
|||||||
Reference in New Issue
Block a user