Add campaign progress timeline

This commit is contained in:
2026-06-23 05:17:16 +09:00
parent 64af9c1f68
commit 8d958f6932
3 changed files with 300 additions and 11 deletions

View File

@@ -294,7 +294,7 @@ try {
});
campScene.render();
});
await page.mouse.click(956, 38);
await page.mouse.click(888, 38);
await page.waitForTimeout(160);
await page.screenshot({ path: 'dist/verification-camp-supplies.png', fullPage: true });
await page.mouse.click(1120, 245);
@@ -321,7 +321,7 @@ try {
throw new Error(`Expected merchant purchase to add bean and spend gold: ${JSON.stringify({ goldBeforeMerchant, campStateAfterMerchant })}`);
}
await page.mouse.click(784, 38);
await page.mouse.click(732, 38);
await page.waitForTimeout(120);
await page.mouse.click(974, 482);
await page.waitForTimeout(260);
@@ -1613,7 +1613,7 @@ try {
throw new Error(`Expected sixteenth camp to expose Liu Biao refuge dialogue/visit sets and preserve Zhao Yun in roster: ${JSON.stringify(sixteenthCampState)}`);
}
await page.mouse.click(870, 38);
await page.mouse.click(810, 38);
await page.waitForTimeout(160);
const sixteenthVisitTabState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
@@ -1730,6 +1730,20 @@ try {
}
await page.screenshot({ path: 'dist/verification-zhuge-recruit-camp.png', fullPage: true });
await page.mouse.click(966, 38);
await page.waitForTimeout(180);
const progressTabState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
if (
progressTabState?.activeTab !== 'progress' ||
progressTabState.campaignProgress?.completedKnown !== progressTabState.campaignProgress?.totalKnown ||
progressTabState.campaignProgress?.activeChapter?.title !== '적벽대전' ||
progressTabState.campaignProgress?.latestBattleTitle !== '융중 방문로' ||
progressTabState.campaignProgress?.nextBattleTitle !== '준비 중'
) {
throw new Error(`Expected progress tab to summarize completed known campaign and point toward Red Cliffs: ${JSON.stringify(progressTabState?.campaignProgress)}`);
}
await page.screenshot({ path: 'dist/verification-campaign-progress.png', fullPage: true });
await page.evaluate(() => window.__HEROS_GAME__?.scene.start('TitleScene'));
await page.waitForFunction(() => {
const activeScenes = window.__HEROS_DEBUG__?.activeScenes() ?? [];