Skip to content

Commit 39b15cb

Browse files
committed
chore: fixing phone viewport tests
1 parent fa16c3a commit 39b15cb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/src/components/modal/test/safe-area/modal.e2e.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,17 @@ async function modalHasFooter(page: any): Promise<boolean> {
2727
});
2828
}
2929

30+
// Phone viewport (less than 768px width)
31+
const PhoneViewport = { width: 390, height: 844 };
32+
3033
// =============================================================================
3134
// Phone Tests - Fullscreen modals need wrapper padding when no footer
3235
// =============================================================================
3336

3437
configs({ modes: ['ios', 'md'], directions: ['ltr'] }).forEach(({ title, config }) => {
3538
test.describe(title('modal: safe-area - phone'), () => {
3639
test.beforeEach(async ({ page }) => {
37-
await page.setViewportSize(Viewports.large);
40+
await page.setViewportSize(PhoneViewport);
3841
await page.goto('/src/components/modal/test/safe-area', config);
3942
});
4043

@@ -82,7 +85,7 @@ configs({ modes: ['ios', 'md'], directions: ['ltr'] }).forEach(({ title, config
8285
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
8386
test.describe(title('modal: safe-area - card modal on phone'), () => {
8487
test.beforeEach(async ({ page }) => {
85-
await page.setViewportSize(Viewports.large);
88+
await page.setViewportSize(PhoneViewport);
8689
await page.goto('/src/components/modal/test/safe-area', config);
8790
});
8891

0 commit comments

Comments
 (0)