diff --git a/web/src/app/App.test.ts b/web/src/app/App.test.ts index 2fe1201..75409a8 100644 --- a/web/src/app/App.test.ts +++ b/web/src/app/App.test.ts @@ -21,5 +21,6 @@ describe('应用外壳', () => { expect(wrapper.get('header').attributes('aria-label')).toBe('应用导航'); expect(wrapper.get('main').attributes('id')).toBe('main-content'); expect(wrapper.text()).toContain('A 股市场分析工具'); + expect(wrapper.text()).toContain('工程基线已就绪'); }); }); diff --git a/web/src/app/router.ts b/web/src/app/router.ts index aaa5c7c..4cf79c5 100644 --- a/web/src/app/router.ts +++ b/web/src/app/router.ts @@ -4,13 +4,15 @@ import { type RouterHistory, type RouteRecordRaw, } from 'vue-router'; +import { h } from 'vue'; const routes: RouteRecordRaw[] = [ { path: '/', name: 'home', component: { - template: '

工程基线已就绪

', + // 工程基线不引入运行时模板编译器;业务首页落地前用渲染函数提供可观测占位内容。 + render: () => h('section', { 'aria-label': '应用就绪' }, [h('p', '工程基线已就绪')]), }, }, ]; diff --git a/web/tests/smoke.spec.ts b/web/tests/smoke.spec.ts index a4f984f..4c7fedc 100644 --- a/web/tests/smoke.spec.ts +++ b/web/tests/smoke.spec.ts @@ -4,7 +4,9 @@ test('应用外壳在桌面和移动视口均可正常呈现', async ({ page }) const runtimeErrors: string[] = []; page.on('console', (message) => { - if (message.type() === 'error') runtimeErrors.push(message.text()); + if (message.type() === 'error' || message.type() === 'warning') { + runtimeErrors.push(message.text()); + } }); page.on('pageerror', (error) => runtimeErrors.push(error.message));