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

This commit is contained in:
严浩
2025-09-09 22:35:19 +08:00
parent 7866ac6015
commit 8973e616d1
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')
})
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>
<template>
<div>
<div class="app-layout">
<div>AppLayout</div>
<router-view />
</div>