fix: update mobile menu tests to use mobile viewport

This commit is contained in:
张翔
2026-02-27 11:10:00 +08:00
parent b787c769ec
commit 0c7a7f5b05
4 changed files with 13 additions and 4 deletions
@@ -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);