feat: Phase 1-3 全部完成 — 沙盒增强、学情分析、学习路径

This commit is contained in:
yuzhiran-dev
2026-05-18 09:48:51 +08:00
commit 11bb86854c
277 changed files with 37755 additions and 0 deletions
+20
View File
@@ -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();
});
});