feat: Phase 1-3 全部完成 — 沙盒增强、学情分析、学习路径
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test.describe('404 页面', () => {
|
||||
test('访问不存在页面显示 404', async ({ page }) => {
|
||||
await page.goto('/this-page-does-not-exist-12345');
|
||||
|
||||
await expect(page.locator('body')).toBeVisible();
|
||||
|
||||
const has404 = page.getByText('404').first();
|
||||
const hasNotFound = page.getByText(/找不到|不存在|页面/i).first();
|
||||
const is404 = await has404.isVisible().catch(() => false);
|
||||
const isNotFound = await hasNotFound.isVisible().catch(() => false);
|
||||
|
||||
expect(is404 || isNotFound).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user