feat: surface campaign officer portraits

This commit is contained in:
2026-07-10 19:40:07 +09:00
parent fc34eca8cf
commit 5bc2852882
27 changed files with 388 additions and 38 deletions

View File

@@ -390,6 +390,28 @@ try {
await page.screenshot({ path: `${screenshotDir}/rc-mid-camp-sortie-formation.png`, fullPage: true });
await assertCanvasPainted(page, 'mid camp sortie formation');
const midFormationPortraitState = await page.evaluate(() => window.__HEROS_DEBUG__?.camp());
const missingMidFormationPortraits = midFormationPortraitState?.sortiePortraitRoster?.filter(
(unit) => !unit.portraitReady || !unit.portraitTextureKey?.startsWith('portrait-card-')
) ?? [];
assert(
midFormationPortraitState?.sortiePortraitRoster?.length === 23 && missingMidFormationPortraits.length === 0,
`Expected all 23 campaign officers to use loaded lightweight portrait cards: ${JSON.stringify(missingMidFormationPortraits)}`
);
await page.mouse.move(530, 260);
await page.waitForFunction(() => Boolean(window.__HEROS_DEBUG__?.camp()?.sortieHoveredUnitId), undefined, { timeout: 30000 });
const hoveredPortraitUnitId = await page.evaluate(() => window.__HEROS_DEBUG__?.camp()?.sortieHoveredUnitId);
assert(
midFormationPortraitState.sortiePortraitRoster.some(
(unit) => unit.id === hoveredPortraitUnitId && unit.portraitReady && unit.portraitTextureKey?.startsWith('portrait-card-')
),
`Expected portrait-card hover feedback for a mapped officer: ${JSON.stringify(hoveredPortraitUnitId)}`
);
await page.screenshot({ path: `${screenshotDir}/rc-mid-camp-sortie-formation-hover.png`, fullPage: true });
await page.mouse.move(40, 710);
await page.waitForFunction(() => window.__HEROS_DEBUG__?.camp()?.sortieHoveredUnitId === null, undefined, { timeout: 30000 });
const midFormationFirstPage = await page.evaluate(() => window.__HEROS_DEBUG__?.camp()?.sortiePortraitRosterView);
await page.mouse.click(658, 196);
await page.waitForFunction((previousScroll) => {