- Raise use-swipe-gesture mutation score to 66.13% (target 65%+) - Maintain use-reduced-motion mutation score at 76.32% (target 50%+) - Fix use-reduced-motion.ts ESLint set-state-in-effect warning - Add UJ-10 deep searcher journey (category browse → article read → content discovery) - Add 40 new test files (analytics, detail, sections, ui, lib components) - Update test-strategy-plan.md to v2.0 (sync test count to 1591) - Sync README.md with final release metrics Quality gates: TS 0 errors, ESLint 0 errors, 121 suites / 1591 tests passed
25 lines
894 B
TypeScript
25 lines
894 B
TypeScript
// @ts-nocheck
|
|
import { test, expect } from '@playwright/test';
|
|
import { PerformanceMonitor } from '../../test-framework/shared/utils/performance/PerformanceMonitor';
|
|
import { performanceThresholds } from '../../test-framework/shared/config/test-data';
|
|
|
|
test.describe('性能测试', () => {
|
|
test('首页加载时间应该小于阈值', async ({ page }) => {
|
|
const monitor = new PerformanceMonitor(page);
|
|
await page.goto('/');
|
|
|
|
const metrics = await monitor.measurePageLoad();
|
|
|
|
expect(metrics.loadTime).toBeLessThan(performanceThresholds.loadTime);
|
|
});
|
|
|
|
test('DOM内容加载时间应该小于阈值', async ({ page }) => {
|
|
const monitor = new PerformanceMonitor(page);
|
|
await page.goto('/');
|
|
|
|
const metrics = await monitor.measurePageLoad();
|
|
|
|
expect(metrics.domContentLoaded).toBeLessThan(performanceThresholds.domContentLoaded);
|
|
});
|
|
});
|