fix: update mobile menu tests to use mobile viewport
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user