Add northern campaign prep milestone
This commit is contained in:
@@ -7593,13 +7593,87 @@ try {
|
||||
postFinalCaptureProgressState?.activeTab !== 'progress' ||
|
||||
postFinalCaptureProgressState.campaignProgress?.completedKnown !== 54 ||
|
||||
postFinalCaptureProgressState.campaignProgress?.totalKnown !== 54 ||
|
||||
postFinalCaptureProgressState.campaignProgress?.activeChapter?.title !== '북벌 준비' ||
|
||||
postFinalCaptureProgressState.campaignProgress?.latestBattleTitle !== '칠종칠금 7차전' ||
|
||||
postFinalCaptureProgressState.campaignProgress?.nextBattleTitle !== '준비 중'
|
||||
postFinalCaptureProgressState.campaignProgress?.nextBattleTitle !== '북벌 준비 회의'
|
||||
) {
|
||||
throw new Error(`Expected post-final-capture progress tab to complete the fifty-fourth battle and pause before the northern campaign setup: ${JSON.stringify(postFinalCaptureProgressState?.campaignProgress)}`);
|
||||
throw new Error(`Expected post-final-capture progress tab to complete the fifty-fourth battle and point toward northern campaign preparation: ${JSON.stringify(postFinalCaptureProgressState?.campaignProgress)}`);
|
||||
}
|
||||
await page.screenshot({ path: 'dist/verification-post-final-capture-progress.png', fullPage: true });
|
||||
|
||||
await page.mouse.click(1120, 38);
|
||||
await page.waitForTimeout(180);
|
||||
const northernPrepSortieState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
|
||||
if (
|
||||
!northernPrepSortieState?.sortieVisible ||
|
||||
northernPrepSortieState.campaign?.step !== 'fifty-fourth-camp' ||
|
||||
northernPrepSortieState.campTitle !== '남중 평정 후 군영' ||
|
||||
northernPrepSortieState.sortiePlan?.objectiveLine !== '북벌 준비 회의 · 군영 의정' ||
|
||||
northernPrepSortieState.sortiePlan?.maxCount !== 7 ||
|
||||
northernPrepSortieState.sortiePlan?.recommendedTotal !== 7 ||
|
||||
!northernPrepSortieState.sortieRoster?.some((unit) => unit.id === 'zhuge-liang' && unit.selected && unit.required) ||
|
||||
!northernPrepSortieState.sortieRoster?.some((unit) => unit.id === 'zhao-yun' && unit.recommended) ||
|
||||
!northernPrepSortieState.sortieRoster?.some((unit) => unit.id === 'huang-quan' && unit.recommended) ||
|
||||
!northernPrepSortieState.sortieRoster?.some((unit) => unit.id === 'ma-liang' && unit.recommended) ||
|
||||
northernPrepSortieState.sortieRoster?.some((unit) => unit.id === 'liu-bei')
|
||||
) {
|
||||
throw new Error(`Expected northern campaign prep sortie panel to center Zhuge Liang, exclude Liu Bei, and expose a seven-officer planning roster: ${JSON.stringify(northernPrepSortieState)}`);
|
||||
}
|
||||
await page.screenshot({ path: 'dist/verification-northern-prep-sortie.png', fullPage: true });
|
||||
|
||||
await page.mouse.click(1068, 646);
|
||||
await page.waitForFunction(() => {
|
||||
const activeScenes = window.__HEROS_DEBUG__?.activeScenes() ?? [];
|
||||
return activeScenes.includes('StoryScene');
|
||||
});
|
||||
await page.screenshot({ path: 'dist/verification-northern-prep-story.png', fullPage: true });
|
||||
|
||||
for (let i = 0; i < 18; i += 1) {
|
||||
const returnedToCamp = await page.evaluate(() => {
|
||||
const activeScenes = window.__HEROS_DEBUG__?.activeScenes() ?? [];
|
||||
return activeScenes.includes('CampScene') && !activeScenes.includes('StoryScene');
|
||||
});
|
||||
if (returnedToCamp) {
|
||||
break;
|
||||
}
|
||||
await page.keyboard.press('Space');
|
||||
await page.waitForTimeout(320);
|
||||
}
|
||||
await page.waitForFunction(() => {
|
||||
const activeScenes = window.__HEROS_DEBUG__?.activeScenes() ?? [];
|
||||
return activeScenes.includes('CampScene') && !activeScenes.includes('StoryScene');
|
||||
});
|
||||
|
||||
const northernPrepCampState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
|
||||
if (
|
||||
northernPrepCampState?.campaign?.step !== 'northern-campaign-prep-camp' ||
|
||||
northernPrepCampState.campTitle !== '북벌 준비 군영' ||
|
||||
northernPrepCampState.campBattleId !== 'fifty-fourth-battle-meng-huo-final-capture' ||
|
||||
northernPrepCampState.availableDialogueIds?.length !== 3 ||
|
||||
!northernPrepCampState.availableDialogueIds.every((id) => id.startsWith('northern-prep-')) ||
|
||||
northernPrepCampState.availableVisitIds?.length !== 2 ||
|
||||
!northernPrepCampState.availableVisitIds.every((id) => id.startsWith('northern-prep-')) ||
|
||||
northernPrepCampState.rosterCollection?.total < 21
|
||||
) {
|
||||
throw new Error(`Expected northern campaign prep story to persist a dedicated camp step with preparation dialogue and visit sets: ${JSON.stringify(northernPrepCampState)}`);
|
||||
}
|
||||
await page.screenshot({ path: 'dist/verification-northern-prep-camp.png', fullPage: true });
|
||||
|
||||
await page.mouse.click(966, 38);
|
||||
await page.waitForTimeout(180);
|
||||
const postNorthernPrepProgressState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
|
||||
if (
|
||||
postNorthernPrepProgressState?.activeTab !== 'progress' ||
|
||||
postNorthernPrepProgressState.campaignProgress?.completedKnown !== 54 ||
|
||||
postNorthernPrepProgressState.campaignProgress?.totalKnown !== 54 ||
|
||||
postNorthernPrepProgressState.campaignProgress?.activeChapter?.title !== '북벌 준비' ||
|
||||
postNorthernPrepProgressState.campaignProgress?.latestBattleTitle !== '칠종칠금 7차전' ||
|
||||
postNorthernPrepProgressState.campaignProgress?.nextBattleTitle !== '제1차 북벌 출진 준비'
|
||||
) {
|
||||
throw new Error(`Expected northern campaign prep progress tab to pause before the first northern expedition battle: ${JSON.stringify(postNorthernPrepProgressState?.campaignProgress)}`);
|
||||
}
|
||||
await page.screenshot({ path: 'dist/verification-post-northern-prep-progress.png', fullPage: true });
|
||||
|
||||
await page.evaluate(() => {
|
||||
const game = window.__HEROS_GAME__;
|
||||
game?.scene.stop('CampScene');
|
||||
@@ -7631,11 +7705,11 @@ try {
|
||||
activeScenes: window.__HEROS_DEBUG__?.activeScenes() ?? [],
|
||||
camp: window.__HEROS_DEBUG__?.camp?.() ?? null
|
||||
}));
|
||||
if (!titleContinueState.activeScenes.includes('CampScene') || titleContinueState.camp?.campaign?.step !== 'fifty-fourth-camp') {
|
||||
throw new Error(`Expected title continue to reopen the Nanzhong pacification camp: ${JSON.stringify(titleContinueState)}`);
|
||||
if (!titleContinueState.activeScenes.includes('CampScene') || titleContinueState.camp?.campaign?.step !== 'northern-campaign-prep-camp') {
|
||||
throw new Error(`Expected title continue to reopen the northern campaign prep camp: ${JSON.stringify(titleContinueState)}`);
|
||||
}
|
||||
|
||||
console.log(`Verified title-to-final-Meng-Huo-capture flow, recruited officer sortie selection, Ma Liang, Yi Ji, Gong Zhi, Huang Zhong, Wei Yan, Pang Tong, Fa Zheng, Wu Yi, Yan Yan, Li Yan, Huang Quan, Ma Chao, Ma Dai, Wang Ping joins, Luofeng, Luo main gate, Mianzhu, Chengdu surrender, Jiameng, Yangping, Dingjun, Hanzhong decisive battle, King of Hanzhong council, Shu-Han foundation state, Jing Province defense vanguard, Fan Castle vanguard, Han River flood, Fan siege, Jing rear crisis, Gongan collapse, Maicheng isolation, Yiling vanguard, Yiling fire attack, Baidi entrustment, Nanzhong stabilization, Meng Huo pacification, second capture, third capture, fourth capture, fifth capture, sixth capture, and Nanzhong pacification state at ${targetUrl}`);
|
||||
console.log(`Verified title-to-northern-campaign-prep flow, recruited officer sortie selection, Ma Liang, Yi Ji, Gong Zhi, Huang Zhong, Wei Yan, Pang Tong, Fa Zheng, Wu Yi, Yan Yan, Li Yan, Huang Quan, Ma Chao, Ma Dai, Wang Ping joins, Luofeng, Luo main gate, Mianzhu, Chengdu surrender, Jiameng, Yangping, Dingjun, Hanzhong decisive battle, King of Hanzhong council, Shu-Han foundation state, Jing Province defense vanguard, Fan Castle vanguard, Han River flood, Fan siege, Jing rear crisis, Gongan collapse, Maicheng isolation, Yiling vanguard, Yiling fire attack, Baidi entrustment, Nanzhong stabilization, Meng Huo pacification, second capture, third capture, fourth capture, fifth capture, sixth capture, final capture, and northern campaign preparation state at ${targetUrl}`);
|
||||
} finally {
|
||||
await browser?.close();
|
||||
if (serverProcess && !serverProcess.killed) {
|
||||
|
||||
Reference in New Issue
Block a user