From 39b15cb3b0da9e0df1cc50876a02ba897d66b119 Mon Sep 17 00:00:00 2001 From: ShaneK Date: Fri, 2 Jan 2026 08:15:39 -0800 Subject: [PATCH] chore: fixing phone viewport tests --- core/src/components/modal/test/safe-area/modal.e2e.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/components/modal/test/safe-area/modal.e2e.ts b/core/src/components/modal/test/safe-area/modal.e2e.ts index af492be983..d317c85ae7 100644 --- a/core/src/components/modal/test/safe-area/modal.e2e.ts +++ b/core/src/components/modal/test/safe-area/modal.e2e.ts @@ -27,6 +27,9 @@ async function modalHasFooter(page: any): Promise { }); } +// Phone viewport (less than 768px width) +const PhoneViewport = { width: 390, height: 844 }; + // ============================================================================= // Phone Tests - Fullscreen modals need wrapper padding when no footer // ============================================================================= @@ -34,7 +37,7 @@ async function modalHasFooter(page: any): Promise { configs({ modes: ['ios', 'md'], directions: ['ltr'] }).forEach(({ title, config }) => { test.describe(title('modal: safe-area - phone'), () => { test.beforeEach(async ({ page }) => { - await page.setViewportSize(Viewports.large); + await page.setViewportSize(PhoneViewport); await page.goto('/src/components/modal/test/safe-area', config); }); @@ -82,7 +85,7 @@ configs({ modes: ['ios', 'md'], directions: ['ltr'] }).forEach(({ title, config configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { test.describe(title('modal: safe-area - card modal on phone'), () => { test.beforeEach(async ({ page }) => { - await page.setViewportSize(Viewports.large); + await page.setViewportSize(PhoneViewport); await page.goto('/src/components/modal/test/safe-area', config); });