diff --git a/web/tests/brandSource.test.ts b/web/tests/brandSource.test.ts index 243bf2f4..9b5b8d13 100644 --- a/web/tests/brandSource.test.ts +++ b/web/tests/brandSource.test.ts @@ -7,7 +7,7 @@ async function source(path: string) { } test('production Vue surfaces present the HiDeck brand consistently', async () => { - const [app, shell, login, loading, header, commands, automation, settings, atConsole] = await Promise.all([ + const [app, shell, login, loading, header, commands, automation, settings, atConsole, zhCN] = await Promise.all([ source('../src/App.vue'), source('../src/layouts/AuthenticatedShell.vue'), source('../src/views/Login.vue'), @@ -16,7 +16,8 @@ test('production Vue surfaces present the HiDeck brand consistently', async () = source('../src/components/commands/CommandChat.vue'), source('../src/views/AutomaticTasks.vue'), source('../src/views/Settings.vue'), - source('../src/components/DeviceAtTab.vue') + source('../src/components/DeviceAtTab.vue'), + source('../src/i18n/zh-CN.ts') ]) const visibleSources = [app, shell, login, loading, header, commands, automation, settings, atConsole] @@ -27,8 +28,10 @@ test('production Vue surfaces present the HiDeck brand consistently', async () = assert.match(shell, /sidebar-brand-title">HiDeckHIDECKH { assert.match(router, /path: '\/phone'/) assert.match(shell, //) - assert.match(shell, /index: '\/phone', label: '电话'/) + assert.match(shell, /index: '\/phone', label: t\('nav\.phone'\)/) + assert.match(zhCN, /phone:\s*'电话'/) assert.match(shell, /v-for="item in mobileMenuItems"/) })