| 1234567891011121314151617181920212223 |
- import { test, expect } from '@playwright/test';
- test.beforeEach(async ({ page }) => {
- await page.goto('/');
- });
- test.describe('首页基础功能', () => {
- test('页面标题正确', async ({ page }) => {
- await expect(page).toHaveTitle(/乌拉海沟/);
- });
- test('顶部导航栏存在', async ({ page }) => {
- const nav = page.locator('.top-nav').first();
- await expect(nav).toBeAttached();
- });
- test('Cesium 地图容器存在', async ({ page }) => {
- const map = page.locator('#cesiumContainer');
- await expect(map).toBeAttached();
- });
- });
|