diff --git a/app/game-frontend/e2e/mainNavigation.spec.ts b/app/game-frontend/e2e/mainNavigation.spec.ts index 0a2e49e3..d722f64b 100644 --- a/app/game-frontend/e2e/mainNavigation.spec.ts +++ b/app/game-frontend/e2e/mainNavigation.spec.ts @@ -34,6 +34,8 @@ type NavigationFixture = { largeCommandTable?: boolean; currentYear?: number; currentMonth?: number; + scenarioTitle?: string; + latestVote?: { id: number; title: string; hasVoted: boolean } | null; globalRecords?: Array<{ id: number; text: string }>; generalRecords?: Array<{ id: number; text: string }>; worldHistory?: Array<{ id: number; text: string }>; @@ -309,6 +311,7 @@ const installFixture = async (page: Page, state: NavigationFixture) => { year: state.currentYear ?? 185, month: state.currentMonth ?? 1, turnTerm: 10, + scenarioTitle: state.scenarioTitle ?? '', }); } if (operation === 'dashboard.getContextBundleDelta') { @@ -421,7 +424,10 @@ const installFixture = async (page: Page, state: NavigationFixture) => { onlineGenerals: '메뉴검증장수', nationNotice: '
국가 방침
', lastExecuted: null, - latestVote: { id: 9, title: '메뉴 설문', hasVoted: false }, + latestVote: + state.latestVote === undefined + ? { id: 9, title: '메뉴 설문', hasVoted: false } + : state.latestVote, }); } if (operation === 'board.getAccess') { @@ -576,6 +582,7 @@ test('desktop menus preserve ref columns, prefix-safe routes, and controlled dro nationLevel: 3, stage: 1, npcMode: 1, + scenarioTitle: '메인 화면 검증 시나리오', generalMeCalls: 0, operations: [], }; @@ -589,6 +596,45 @@ test('desktop menus preserve ref columns, prefix-safe routes, and controlled dro await expect(page.locator('.main-mobile-bottom')).toBeHidden(); await expect(page.locator('.layout-desktop')).toBeVisible(); await expect(page.locator('.layout-mobile')).toHaveCount(0); + await expect(page.getByRole('heading', { name: '메인 화면 검증 시나리오', exact: true })).toHaveCount(1); + await expect(page.locator('.game-shell__subtitle')).toHaveText('185년 1월 · 턴 10분'); + await expect(page.locator('.game-shell__subtitle')).not.toContainText('메인 화면 검증 시나리오'); + await expect(page.locator('.tournament-status')).toHaveText('토너먼트: 참가 모집중'); + await expect(page.locator('.vote-status')).toHaveText('설문: 메뉴 설문'); + const headerStatusGeometry = await page.locator('.main-page').evaluate((element) => { + const title = element.querySelector- {{ - !isMobile && lobbyInfo?.scenarioTitle ? `${lobbyInfo.scenarioTitle} ${statusLine}` : statusLine - }} -
+{{ statusLine }}