fix: update mobile menu tests to use mobile viewport
This commit is contained in:
@@ -44,15 +44,18 @@ test.describe('导航冒烟测试 @smoke', () => {
|
||||
});
|
||||
|
||||
test('应该显示移动端菜单按钮', async ({ homePage }) => {
|
||||
await homePage.page.setViewportSize({ width: 375, height: 667 });
|
||||
await expect(homePage.mobileMenuButton).toBeVisible();
|
||||
});
|
||||
|
||||
test('应该能够打开移动端菜单', async ({ homePage }) => {
|
||||
await homePage.page.setViewportSize({ width: 375, height: 667 });
|
||||
await homePage.openMobileMenu();
|
||||
await expect(homePage.mobileMenu).toBeVisible();
|
||||
});
|
||||
|
||||
test('应该能够关闭移动端菜单', async ({ homePage }) => {
|
||||
await homePage.page.setViewportSize({ width: 375, height: 667 });
|
||||
await homePage.openMobileMenu();
|
||||
await homePage.closeMobileMenu();
|
||||
await expect(homePage.mobileMenu).not.toBeVisible();
|
||||
|
||||
Reference in New Issue
Block a user