test(e2e): 添加 AppLayout 组件的测试用例

This commit is contained in:
严浩
2025-09-09 22:35:19 +08:00
parent 7824ea3823
commit b14819af3f
2 changed files with 8 additions and 1 deletions

View File

@@ -50,4 +50,11 @@ test.describe('Vue App', () => {
await expect(button).toHaveText('Name from API is: Unknown') await expect(button).toHaveText('Name from API is: Unknown')
}) })
test('app-layout is present', async ({ page }) => {
await page.goto('/')
const appLayout = page.locator('.app-layout')
await expect(appLayout).toBeVisible()
await expect(appLayout).toContainText('AppLayout')
})
}) })

View File

@@ -1,7 +1,7 @@
<script setup lang="ts"></script> <script setup lang="ts"></script>
<template> <template>
<div> <div class="app-layout">
<div>AppLayout</div> <div>AppLayout</div>
<router-view /> <router-view />
</div> </div>