d3ro-voice/apps/desktop/tests/e2e/navigation.spec.ts
Yun Chan 7fe49c437e chore: land in-progress workspace changes before 1.16.2
The tree carried uncommitted work from several areas (web push, mobile
screens, admin charts, test-hygiene cleanup, CI and map docs). It is landed
as one commit so the release pipeline can start from a clean tree; the
desktop transcript-correction behaviour shipped in the previous commit and
is unchanged here.
2026-11-05 21:58:44 +09:00

43 lines
1.4 KiB
TypeScript

// apps/desktop/tests/e2e/navigation.spec.ts
// 셸 내비게이션 계약: 사이드바가 노출하는 화면과, 누르면 현재 화면이 옮겨간다는 행위.
// 화면별 렌더 내용은 각 화면의 단위 테스트가 맡는다. E2E 는 "주요 화면으로 갈 수 있는가"만 본다.
import { expect, expectNoRuntimeErrors, goToRoute, test } from './support/electron-app'
const NAV_ROUTES = [
'home',
'search',
'records',
'meetings',
'conversation',
'commands',
'dictionary',
'knowledge',
'settings',
] as const
test.describe('셸 내비게이션', () => {
test('사이드바는 주 화면·도구 화면·지원·설정을 모두 노출한다', async ({ mainWindow }) => {
const nav = mainWindow.window.getByRole('navigation')
for (const route of NAV_ROUTES) {
await expect(nav.getByTestId(`nav-${route}`)).toBeVisible()
}
await expect(nav.getByTestId('nav-support')).toBeVisible()
expectNoRuntimeErrors(mainWindow)
})
test('각 항목을 누르면 현재 화면 표시(aria-current)가 정확히 하나로 옮겨간다', async ({ mainWindow }) => {
const nav = mainWindow.window.getByRole('navigation')
for (const route of NAV_ROUTES) {
await test.step(route, async () => {
await goToRoute(mainWindow, route)
await expect(nav.locator('[aria-current="page"]')).toHaveCount(1)
})
}
expectNoRuntimeErrors(mainWindow)
})
})