fix: update mobile menu tests to use mobile viewport

This commit is contained in:
张翔 committed 2026-02-27 11:10:00 +08:00
1 parent b787c769ec
commit 0c7a7f5b05
4 files changed
+13 -4

No files matched your search

@@ -84,6 +84,7 @@ test.describe('交互性能测试 @performance', () => {
test('移动端菜单打开应该快速', async ({ homePage, page }) => {
await homePage.goto();
await homePage.waitForPageLoad();
await homePage.page.setViewportSize({ width: 375, height: 667 });
const monitor = new PerformanceMonitor(page);
await monitor.startMonitoring();
@@ -101,6 +102,7 @@ test.describe('交互性能测试 @performance', () => {
test('移动端菜单关闭应该快速', async ({ homePage, page }) => {
await homePage.goto();
await homePage.waitForPageLoad();
await homePage.page.setViewportSize({ width: 375, height: 667 });
await homePage.openMobileMenu();
const monitor = new PerformanceMonitor(page);