diff --git a/core/src/components/select/test/async/e2e.ts b/core/src/components/select/test/async/e2e.ts deleted file mode 100644 index c4958f5fc9..0000000000 --- a/core/src/components/select/test/async/e2e.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('select: async', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/async?ionic:_testing=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/select/test/async/index.html b/core/src/components/select/test/async/index.html index 9046afd101..5293fb9bdb 100644 --- a/core/src/components/select/test/async/index.html +++ b/core/src/components/select/test/async/index.html @@ -44,8 +44,10 @@ }); select.value = options[0]; + + window.dispatchEvent(new CustomEvent('selectValueSet')); }); - }, 5000); + }, 1000); diff --git a/core/src/components/select/test/async/select.e2e.ts b/core/src/components/select/test/async/select.e2e.ts new file mode 100644 index 0000000000..fe72d9dcb8 --- /dev/null +++ b/core/src/components/select/test/async/select.e2e.ts @@ -0,0 +1,17 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('select: async', () => { + test('should correctly set the value after a delay', async ({ page }, testInfo) => { + test.skip(testInfo.project.metadata.rtl === true, 'This is checking internal logic. RTL tests are not needed'); + + await page.goto(`/src/components/select/test/async`); + const selectValueSet = await page.spyOnEvent('selectValueSet'); + + const select = await page.locator('#default'); + + await selectValueSet.next(); + + expect(select).toHaveJSProperty('value', 'bird'); + }); +}); diff --git a/core/src/components/select/test/basic/e2e.ts b/core/src/components/select/test/basic/e2e.ts deleted file mode 100644 index 55222ea5e6..0000000000 --- a/core/src/components/select/test/basic/e2e.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('select: basic', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/basic?ionic:_testing=true', - }); - - const compares = []; - compares.push(await page.compareScreenshot()); - - // Gender Alert Select - let select = await page.find('#gender'); - - // add an event spy to the select - const ionDismiss = await select.spyOnEvent('ionDismiss'); - - await select.click(); - - let alert = await page.find('ion-alert'); - await alert.waitForVisible(); - await page.waitForTimeout(250); - - compares.push(await page.compareScreenshot('should open gender single select')); - - await alert.callMethod('dismiss'); - - expect(ionDismiss).toHaveReceivedEvent(); - - // Skittles Action Sheet Select - select = await page.find('#skittles'); - await select.click(); - - let actionSheet = await page.find('ion-action-sheet'); - await actionSheet.waitForVisible(); - await page.waitForTimeout(250); - - compares.push(await page.compareScreenshot('should open skittles action sheet select')); - - await actionSheet.callMethod('dismiss'); - - expect(ionDismiss).toHaveReceivedEvent(); - - // Custom Alert Select - select = await page.find('#customAlertSelect'); - await select.click(); - - alert = await page.find('ion-alert'); - await alert.waitForVisible(); - await page.waitForTimeout(250); - - compares.push(await page.compareScreenshot('should open custom alert select')); - - await alert.callMethod('dismiss'); - - expect(ionDismiss).toHaveReceivedEvent(); - - // Custom Popover Select - select = await page.find('#customPopoverSelect'); - await select.click(); - - let popover = await page.find('ion-popover'); - await popover.waitForVisible(); - await page.waitForTimeout(250); - - compares.push(await page.compareScreenshot('should open custom popover select')); - - // select has no value, so first option should be focused by default - const popoverOption1 = await popover.find('.select-interface-option:first-child'); - expect(popoverOption1).toHaveClass('ion-focused'); - - let popoverOption2 = await popover.find('.select-interface-option:nth-child(2)'); - await popoverOption2.click(); - await page.waitForTimeout(500); - - await select.click(); - popover = await page.find('ion-popover'); - await popover.waitForVisible(); - await page.waitForTimeout(250); - - popoverOption2 = await popover.find('.select-interface-option:nth-child(2)'); - expect(popoverOption2).toHaveClass('ion-focused'); - - await popover.callMethod('dismiss'); - - expect(ionDismiss).toHaveReceivedEvent(); - - // Custom Action Sheet Select - select = await page.find('#customActionSheetSelect'); - await select.click(); - - actionSheet = await page.find('ion-action-sheet'); - await actionSheet.waitForVisible(); - await page.waitForTimeout(250); - - compares.push(await page.compareScreenshot('should open custom action sheet select')); - - await actionSheet.callMethod('dismiss'); - - expect(ionDismiss).toHaveReceivedEvent(); - - for (const compare of compares) { - expect(compare).toMatchScreenshot(); - } -}); - -test('select:rtl: basic', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/basic?ionic:_testing=true&rtl=true', - }); - - const compares = []; - compares.push(await page.compareScreenshot()); - - for (const compare of compares) { - expect(compare).toMatchScreenshot(); - } -}); diff --git a/core/src/components/select/test/basic/select.e2e.ts b/core/src/components/select/test/basic/select.e2e.ts index f774cd8860..7a4b863bf8 100644 --- a/core/src/components/select/test/basic/select.e2e.ts +++ b/core/src/components/select/test/basic/select.e2e.ts @@ -2,14 +2,16 @@ import { expect } from '@playwright/test'; import { test } from '@utils/test/playwright'; test.describe('select: basic', () => { + test.beforeEach(async ({ page }) => { + await page.goto('/src/components/select/test/basic'); + }); + test('should not open multiple alert windows when clicked multiple times', async ({ page }) => { test.info().annotations.push({ type: 'issue', description: 'https://github.com/ionic-team/ionic-framework/issues/25126', }); - await page.goto('/src/components/select/test/basic'); - const select = page.locator('#gender'); await select.evaluate((el: HTMLSelectElement) => { @@ -28,4 +30,68 @@ test.describe('select: basic', () => { expect(alerts.length).toBe(1); }); + + test.describe('select: alert', () => { + test('it should open an alert select', async ({ page }) => { + const ionAlertDidPresent = await page.spyOnEvent('ionAlertDidPresent'); + const ionDismiss = await page.spyOnEvent('ionDismiss'); + + await page.click('#customAlertSelect'); + + await ionAlertDidPresent.next(); + + expect(await page.screenshot()).toMatchSnapshot(`select-alert-diff-${page.getSnapshotSettings()}.png`); + + const alert = await page.locator('ion-alert'); + await alert.evaluate((el: HTMLIonAlertElement) => el.dismiss()); + + await ionDismiss.next(); + }); + }); + + test.describe('select: action sheet', () => { + test('it should open an action sheet select', async ({ page }) => { + const ionActionSheetDidPresent = await page.spyOnEvent('ionActionSheetDidPresent'); + const ionDismiss = await page.spyOnEvent('ionDismiss'); + + await page.click('#customActionSheetSelect'); + + await ionActionSheetDidPresent.next(); + + expect(await page.screenshot()).toMatchSnapshot(`select-action-sheet-diff-${page.getSnapshotSettings()}.png`); + + const actionSheet = await page.locator('ion-action-sheet'); + await actionSheet.evaluate((el: HTMLIonActionSheetElement) => el.dismiss()); + + await ionDismiss.next(); + }); + }); + + test.describe('select: popover', () => { + test('it should open a popover select', async ({ page, browserName }) => { + const ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent'); + const ionDismiss = await page.spyOnEvent('ionDismiss'); + + await page.click('#customPopoverSelect'); + + await ionPopoverDidPresent.next(); + + const popover = await page.locator('ion-popover'); + + // TODO(FW-1436) + if (browserName !== 'firefox') { + // select has no value, so first option should be focused by default + const popoverOption1 = await popover.locator('.select-interface-option:first-of-type ion-radio'); + expect(popoverOption1).toBeFocused(); + } + + expect(await page.screenshot({ animations: 'disabled' })).toMatchSnapshot( + `select-popover-diff-${page.getSnapshotSettings()}.png` + ); + + await popover.evaluate((el: HTMLIonPopoverElement) => el.dismiss()); + + await ionDismiss.next(); + }); + }); }); diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..ffc7f0ccfa Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..1d28a26bff Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..9c2d8b47b7 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..ec16f7e31c Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..d416ed5c0f Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..9232a60286 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..0639616676 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..045b7e1da1 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..e847f10a9b Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..2f328a4411 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..75103cc439 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..232c03b2a7 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-action-sheet-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..78f9871833 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..9e6656089c Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..80b9386bce Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..eed26fd706 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..d72cdad838 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..f4bcf5a2a5 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..57e763e20c Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..a1dbfca33c Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..11c44b2031 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..47e6679305 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..633413e500 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..1dcfa4061f Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-alert-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..5ae43f022e Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..740f4b6ba5 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..7f829c3824 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..e79e05be8b Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..71cb18fb31 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..ed91fd04e5 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..b514ef41c3 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..a5f6dd4ad9 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..8c14302ae4 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..e96f3c6308 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..b1c84a8e5b Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..09653d1602 Binary files /dev/null and b/core/src/components/select/test/basic/select.e2e.ts-snapshots/select-popover-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/compare-with/e2e.ts b/core/src/components/select/test/compare-with/e2e.ts deleted file mode 100644 index 050fd6e841..0000000000 --- a/core/src/components/select/test/compare-with/e2e.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('select: compareWith', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/compare-with?ionic:_testing=true', - }); - - const compares = []; - compares.push(await page.compareScreenshot()); - - const selectMultiple = await page.find('#multiple'); - await selectMultiple.click(); - - let alert = await page.find('ion-alert'); - await alert.waitForVisible(); - await page.waitForTimeout(250); - - compares.push(await page.compareScreenshot('should open select[multiple] with option selected')); - - await alert.callMethod('dismiss'); - - const selectSingle = await page.find('#single'); - await selectSingle.click(); - - alert = await page.find('ion-alert'); - await alert.waitForVisible(); - await page.waitForTimeout(250); - - compares.push(await page.compareScreenshot('should open select with option selected')); - - await alert.callMethod('dismiss'); - - for (const compare of compares) { - expect(compare).toMatchScreenshot(); - } -}); diff --git a/core/src/components/select/test/compare-with/select.e2e.ts b/core/src/components/select/test/compare-with/select.e2e.ts new file mode 100644 index 0000000000..82c03ff79c --- /dev/null +++ b/core/src/components/select/test/compare-with/select.e2e.ts @@ -0,0 +1,24 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('select: compare-with', () => { + test('should correctly set value when using compareWith property', async ({ page }, testInfo) => { + test.skip(testInfo.project.metadata.rtl === true, 'This is checking internal logic. RTL tests are not needed'); + + await page.goto('/src/components/select/test/compare-with'); + + const multipleSelect = await page.locator('#multiple'); + const singleSelect = await page.locator('#single'); + + expect(multipleSelect).toHaveJSProperty('value', [ + { + label: 'selected by default', + value: '1', + }, + ]); + expect(singleSelect).toHaveJSProperty('value', { + label: 'selected by default', + value: '1', + }); + }); +}); diff --git a/core/src/components/select/test/custom/custom.e2e.ts b/core/src/components/select/test/custom/custom.e2e.ts new file mode 100644 index 0000000000..6c747ec462 --- /dev/null +++ b/core/src/components/select/test/custom/custom.e2e.ts @@ -0,0 +1,10 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('select: custom', () => { + test('should not have visual regressions', async ({ page }) => { + await page.goto(`/src/components/select/test/custom`); + + expect(await page.screenshot()).toMatchSnapshot(`select-custom-diff-${page.getSnapshotSettings()}.png`); + }); +}); diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..7d0dba7da9 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..29ee85f9b2 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..beff63045a Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..5f0c70e411 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..fc0fc2a446 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..a62885b755 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..de2468ee94 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..80e4c7c4f5 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..1a2f963bf0 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..1cb0d66dd9 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..f56552abaf Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..012afd1754 Binary files /dev/null and b/core/src/components/select/test/custom/custom.e2e.ts-snapshots/select-custom-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/custom/e2e.ts b/core/src/components/select/test/custom/e2e.ts deleted file mode 100644 index 64bfe1cc3d..0000000000 --- a/core/src/components/select/test/custom/e2e.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('select: custom', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/custom?ionic:_testing=true', - }); - - const compares = []; - compares.push(await page.compareScreenshot()); - - for (const compare of compares) { - expect(compare).toMatchScreenshot(); - } -}); - -test('select:rtl: custom', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/custom?ionic:_testing=true&rtl=true', - }); - - const compares = []; - compares.push(await page.compareScreenshot()); - - for (const compare of compares) { - expect(compare).toMatchScreenshot(); - } -}); diff --git a/core/src/components/select/test/label/e2e.ts b/core/src/components/select/test/label/e2e.ts deleted file mode 100644 index d4c27c97bc..0000000000 --- a/core/src/components/select/test/label/e2e.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -it('select: label', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/label?ionic:_testing=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/select/test/multiple-value/e2e.ts b/core/src/components/select/test/multiple-value/e2e.ts deleted file mode 100644 index 3cddc83ec3..0000000000 --- a/core/src/components/select/test/multiple-value/e2e.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('select: multiple-value', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/multiple-value?ionic:_testing=true', - }); - - let compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); - - const select = await page.find('#toppings'); - await select.click(); - - const alert = await page.find('ion-alert'); - await alert.waitForVisible(); - await page.waitForTimeout(250); - - compare = await page.compareScreenshot('should open toppings multiple select'); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/select/test/single-value/e2e.ts b/core/src/components/select/test/single-value/e2e.ts deleted file mode 100644 index b7b8e082fd..0000000000 --- a/core/src/components/select/test/single-value/e2e.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('select: single-value', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/single-value?ionic:_testing=true', - }); - - let compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); - - const select = await page.find('#gender'); - await select.click(); - - const alert = await page.find('ion-alert'); - await alert.waitForVisible(); - await page.waitForTimeout(250); - - compare = await page.compareScreenshot('should open gender single select'); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/select/test/single-value/select.e2e.ts b/core/src/components/select/test/single-value/select.e2e.ts new file mode 100644 index 0000000000..128bc63a35 --- /dev/null +++ b/core/src/components/select/test/single-value/select.e2e.ts @@ -0,0 +1,16 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('select: single-value', () => { + test('should open single value select', async ({ page }) => { + await page.goto(`/src/components/select/test/single-value`); + + const ionAlertDidPresent = await page.spyOnEvent('ionAlertDidPresent'); + + await page.click('#gender'); + + await ionAlertDidPresent.next(); + + expect(await page.screenshot()).toMatchSnapshot(`select-single-value-diff-${page.getSnapshotSettings()}.png`); + }); +}); diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..a521313140 Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..50c01c0fb6 Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..2a952222f6 Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..662d6c08b2 Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..bb9a341a86 Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..95d34e2b4e Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..e25f042ea5 Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..601fbb271a Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..177929ca86 Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..6452bfbb3d Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..212595dc5b Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..ed651edad2 Binary files /dev/null and b/core/src/components/select/test/single-value/select.e2e.ts-snapshots/select-single-value-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/spec/e2e.ts b/core/src/components/select/test/spec/e2e.ts deleted file mode 100644 index 44b1955c46..0000000000 --- a/core/src/components/select/test/spec/e2e.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('select: spec', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/spec?ionic:_testing=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/select/test/spec/select.e2e.ts b/core/src/components/select/test/spec/select.e2e.ts new file mode 100644 index 0000000000..81225abb28 --- /dev/null +++ b/core/src/components/select/test/spec/select.e2e.ts @@ -0,0 +1,12 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('select: spec', () => { + test('should not have visual regressions', async ({ page }) => { + await page.goto(`/src/components/select/test/spec`); + + await page.setIonViewport(); + + expect(await page.screenshot()).toMatchSnapshot(`select-spec-diff-${page.getSnapshotSettings()}.png`); + }); +}); diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..6149adef69 Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..7830b8a887 Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..336ab4a454 Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..f4a9c19e9d Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..8ba3d8ea16 Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..82beb40572 Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..4b7624ef0a Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..6f345bb309 Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..abb55b41c3 Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..bc0f686459 Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..67cb62b5b0 Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..d1a4d3fcec Binary files /dev/null and b/core/src/components/select/test/spec/select.e2e.ts-snapshots/select-spec-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/select/test/standalone/e2e.ts b/core/src/components/select/test/standalone/e2e.ts deleted file mode 100644 index 4c98a18bca..0000000000 --- a/core/src/components/select/test/standalone/e2e.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('select: standalone', async () => { - const page = await newE2EPage({ - url: '/src/components/select/test/standalone?ionic:_testing=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/select/test/standalone/select.e2e.ts b/core/src/components/select/test/standalone/select.e2e.ts new file mode 100644 index 0000000000..5cb75a5a03 --- /dev/null +++ b/core/src/components/select/test/standalone/select.e2e.ts @@ -0,0 +1,18 @@ +import { test } from '@utils/test/playwright'; + +test.describe('select: standalone', () => { + test('should open an overlay without ion-app', async ({ page }) => { + await page.goto(`/src/components/select/test/standalone`); + const ionAlertDidPresent = await page.spyOnEvent('ionAlertDidPresent'); + const ionAlertDidDismiss = await page.spyOnEvent('ionAlertDidDismiss'); + + await page.click('#gender'); + + await ionAlertDidPresent.next(); + + const alert = await page.locator('ion-alert'); + await alert.evaluate((el: HTMLIonAlertElement) => el.dismiss()); + + await ionAlertDidDismiss.next(); + }); +});