base/test/capability.spec.js

15 lines
583 B
JavaScript

import { test, expect } from '@playwright/test';
test('capability demo switches sections through Nav', async ({ page }) => {
await page.goto('/test/capability.html');
await expect(page.locator('#mainNav')).toBeVisible();
await expect(page.getByRole('heading', { name: '项目概览' })).toBeVisible();
await page.getByRole('button', { name: '表单与控件' }).click();
await expect(page.locator('#demoForm')).toBeVisible();
await page.getByRole('button', { name: '增强列表' }).click();
await expect(page.locator('#demoList')).toBeVisible();
});