Add Liu Biao camp visit events
This commit is contained in:
@@ -294,7 +294,7 @@ try {
|
||||
});
|
||||
campScene.render();
|
||||
});
|
||||
await page.mouse.click(918, 38);
|
||||
await page.mouse.click(956, 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(830, 38);
|
||||
await page.mouse.click(784, 38);
|
||||
await page.waitForTimeout(120);
|
||||
await page.mouse.click(974, 482);
|
||||
await page.waitForTimeout(260);
|
||||
@@ -1607,11 +1607,35 @@ try {
|
||||
sixteenthCampState.campTitle !== '형주 의탁 후 군영' ||
|
||||
sixteenthCampState.availableDialogueIds?.length !== 3 ||
|
||||
!sixteenthCampState.availableDialogueIds.every((id) => id.endsWith('liu-biao-refuge')) ||
|
||||
sixteenthCampState.availableVisitIds?.length !== 3 ||
|
||||
!sixteenthCampState.campaign?.roster?.some((unit) => unit.id === 'zhao-yun')
|
||||
) {
|
||||
throw new Error(`Expected sixteenth camp to expose Liu Biao refuge dialogue set and preserve Zhao Yun in roster: ${JSON.stringify(sixteenthCampState)}`);
|
||||
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.waitForTimeout(160);
|
||||
const sixteenthVisitTabState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
|
||||
if (
|
||||
sixteenthVisitTabState?.activeTab !== 'visit' ||
|
||||
!sixteenthVisitTabState.availableVisitIds?.includes('jingzhou-scholar-rumors') ||
|
||||
sixteenthVisitTabState.completedAvailableVisits?.length !== 0
|
||||
) {
|
||||
throw new Error(`Expected Liu Biao camp visit tab to expose local visit choices: ${JSON.stringify(sixteenthVisitTabState)}`);
|
||||
}
|
||||
|
||||
await page.mouse.click(974, 436);
|
||||
await page.waitForTimeout(260);
|
||||
const sixteenthVisitRewardState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
|
||||
if (
|
||||
!sixteenthVisitRewardState.completedAvailableVisits?.includes('jingzhou-scholar-rumors') ||
|
||||
!sixteenthVisitRewardState.campaign?.completedCampVisits?.includes('jingzhou-scholar-rumors') ||
|
||||
(sixteenthVisitRewardState.campaign?.inventory?.['와룡 소문'] ?? 0) < 1
|
||||
) {
|
||||
throw new Error(`Expected completed visit to persist and award Wolong clue inventory: ${JSON.stringify(sixteenthVisitRewardState)}`);
|
||||
}
|
||||
await page.screenshot({ path: 'dist/verification-liu-biao-visits.png', fullPage: true });
|
||||
|
||||
await page.evaluate(() => window.__HEROS_GAME__?.scene.start('TitleScene'));
|
||||
await page.waitForFunction(() => {
|
||||
const activeScenes = window.__HEROS_DEBUG__?.activeScenes() ?? [];
|
||||
|
||||
Reference in New Issue
Block a user