diff --git a/core/src/components/popover/test/size/popover.e2e.ts b/core/src/components/popover/test/size/popover.e2e.ts index a8f10462e2..936253541f 100644 --- a/core/src/components/popover/test/size/popover.e2e.ts +++ b/core/src/components/popover/test/size/popover.e2e.ts @@ -8,26 +8,38 @@ import { openPopover, screenshotPopover } from '../test.utils'; */ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { test.describe(title('popover: size'), async () => { - /** - * The popovers have showBackdrop=false so we can open most of them at once - * and massively cut down on screenshots taken. The content has its own - * backdrop so you can still see the popovers. - */ - // TODO FW-3598 - test.skip('should calculate popover width based on sizing method', async ({ page }) => { + test.beforeEach(async ({ page }) => { await page.goto('/src/components/popover/test/size', config); - await page.setViewportSize(Viewports.tablet.portrait); // avoid popovers overlapping + }); - const sameTimeTriggers = ['auto-trigger', 'cover-trigger', 'event-trigger']; + test.describe('popover: invisible backdrop', async () => { + /** + * The popovers have showBackdrop=false so we can open most of them at once + * and massively cut down on screenshots taken. The content has its own + * backdrop so you can still see the popovers. + */ + test('should calculate popover width based on sizing method', async ({ page }) => { + await page.setViewportSize(Viewports.tablet.portrait); // avoid popovers overlapping - for (const trigger of sameTimeTriggers) { - await openPopover(page, trigger, true); - } + const sameTimeTriggers = ['auto-trigger', 'cover-trigger', 'event-trigger']; - await expect(page).toHaveScreenshot(screenshot(`popover-size`)); + for (const trigger of sameTimeTriggers) { + await openPopover(page, trigger, true); + } - // test this one separately since it would overlap others - await screenshotPopover(page, screenshot, 'no-event-trigger', 'size'); + await expect(page).toHaveScreenshot(screenshot(`popover-size`)); + }); + }); + + test.describe('popover: visible backdrop', async () => { + test('should calculate popover width based on sizing method', async ({ page }) => { + /** + * This must be tested separately because it's not aimed to be opened at the same time as the others. + * Otherwise, the backdrops from the previous popovers would be mounted on top of each other. This is a problem because the following trigger won't be accessible to click. + * The mounted backdrops would be in the way and would need to be closed first. + */ + await screenshotPopover(page, screenshot, 'no-event-trigger', 'size'); + }); }); }); }); diff --git a/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Chrome-linux.png index f4dd4a2607..a0719313e9 100644 Binary files a/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Firefox-linux.png index 091fdc0890..ed1f373c6a 100644 Binary files a/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Safari-linux.png b/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Safari-linux.png index 4bbb437fbf..3d0966f347 100644 Binary files a/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/popover/test/size/popover.e2e.ts-snapshots/popover-size-no-event-trigger-ios-ltr-Mobile-Safari-linux.png differ