feat: Phase 1-3 全部完成 — 沙盒增强、学情分析、学习路径
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test.describe('暗黑模式切换', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/');
|
||||
});
|
||||
|
||||
test('主题切换按钮存在', async ({ page }) => {
|
||||
const toggleBtn = page.locator('button').filter({ has: page.locator('svg') }).first();
|
||||
await expect(toggleBtn).toBeVisible();
|
||||
});
|
||||
|
||||
test('点击主题切换按钮无错误', async ({ page }) => {
|
||||
const toggleBtn = page.locator('button').filter({ has: page.locator('svg') }).first();
|
||||
await expect(toggleBtn).toBeEnabled();
|
||||
await toggleBtn.click();
|
||||
await page.waitForTimeout(500);
|
||||
await expect(page.locator('html')).toBeAttached();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user