From df3aaff7c34dc520301120263b67be02bdc1e9d9 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 2 May 2023 11:38:00 -0400 Subject: [PATCH] test(picker, picker-column): migrate to generators (#27352) Issue number: N/A --------- ## What is the current behavior? Picker and picker column tests use legacy syntax ## What is the new behavior? - Picker and picker column tests use generator syntax ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information --- .../standalone/picker-column.e2e-legacy.ts | 19 --------- .../test/standalone/picker-column.e2e.ts | 22 ++++++++++ ...mn-initial-ios-ltr-Mobile-Chrome-linux.png | Bin ...n-initial-ios-ltr-Mobile-Firefox-linux.png | Bin ...mn-initial-ios-ltr-Mobile-Safari-linux.png | Bin ...mn-initial-ios-rtl-Mobile-Chrome-linux.png | Bin ...n-initial-ios-rtl-Mobile-Firefox-linux.png | Bin ...mn-initial-ios-rtl-Mobile-Safari-linux.png | Bin ...umn-initial-md-ltr-Mobile-Chrome-linux.png | Bin ...mn-initial-md-ltr-Mobile-Firefox-linux.png | Bin ...umn-initial-md-ltr-Mobile-Safari-linux.png | Bin ...umn-initial-md-rtl-Mobile-Chrome-linux.png | Bin ...mn-initial-md-rtl-Mobile-Firefox-linux.png | Bin ...umn-initial-md-rtl-Mobile-Safari-linux.png | Bin ...mn-initial-ios-ltr-Mobile-Chrome-linux.png | Bin ...n-initial-ios-ltr-Mobile-Firefox-linux.png | Bin ...mn-initial-ios-ltr-Mobile-Safari-linux.png | Bin ...mn-initial-ios-rtl-Mobile-Chrome-linux.png | Bin ...n-initial-ios-rtl-Mobile-Firefox-linux.png | Bin ...mn-initial-ios-rtl-Mobile-Safari-linux.png | Bin ...umn-initial-md-ltr-Mobile-Chrome-linux.png | Bin ...mn-initial-md-ltr-Mobile-Firefox-linux.png | Bin ...umn-initial-md-ltr-Mobile-Safari-linux.png | Bin ...umn-initial-md-rtl-Mobile-Chrome-linux.png | Bin ...mn-initial-md-rtl-Mobile-Firefox-linux.png | Bin ...umn-initial-md-rtl-Mobile-Safari-linux.png | Bin .../picker-column/test/test.utils.ts | 12 ++++-- .../picker/test/basic/picker.e2e-legacy.ts | 26 ------------ .../picker/test/basic/picker.e2e.ts | 28 +++++++++++++ ...cker-basic-ios-ltr-Mobile-Chrome-linux.png | Bin ...ker-basic-ios-ltr-Mobile-Firefox-linux.png | Bin ...cker-basic-ios-ltr-Mobile-Safari-linux.png | Bin ...cker-basic-ios-rtl-Mobile-Chrome-linux.png | Bin ...ker-basic-ios-rtl-Mobile-Firefox-linux.png | Bin ...cker-basic-ios-rtl-Mobile-Safari-linux.png | Bin ...icker-basic-md-ltr-Mobile-Chrome-linux.png | Bin ...cker-basic-md-ltr-Mobile-Firefox-linux.png | Bin ...icker-basic-md-ltr-Mobile-Safari-linux.png | Bin ...icker-basic-md-rtl-Mobile-Chrome-linux.png | Bin ...cker-basic-md-rtl-Mobile-Firefox-linux.png | Bin ...icker-basic-md-rtl-Mobile-Safari-linux.png | Bin ...e-selected-ios-ltr-Mobile-Chrome-linux.png | Bin ...-selected-ios-ltr-Mobile-Firefox-linux.png | Bin ...e-selected-ios-ltr-Mobile-Safari-linux.png | Bin ...e-selected-ios-rtl-Mobile-Chrome-linux.png | Bin ...-selected-ios-rtl-Mobile-Firefox-linux.png | Bin ...e-selected-ios-rtl-Mobile-Safari-linux.png | Bin ...ue-selected-md-ltr-Mobile-Chrome-linux.png | Bin ...e-selected-md-ltr-Mobile-Firefox-linux.png | Bin ...ue-selected-md-ltr-Mobile-Safari-linux.png | Bin ...ue-selected-md-rtl-Mobile-Chrome-linux.png | Bin ...e-selected-md-rtl-Mobile-Firefox-linux.png | Bin ...ue-selected-md-rtl-Mobile-Safari-linux.png | Bin .../picker/test/is-open/picker.e2e-legacy.ts | 34 ---------------- .../picker/test/is-open/picker.e2e.ts | 37 +++++++++++++++++ .../picker/test/trigger/picker.e2e-legacy.ts | 35 ---------------- .../picker/test/trigger/picker.e2e.ts | 38 ++++++++++++++++++ 57 files changed, 134 insertions(+), 117 deletions(-) delete mode 100644 core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts create mode 100644 core/src/components/picker-column/test/standalone/picker-column.e2e.ts rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-ios-ltr-Mobile-Chrome-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-ios-ltr-Mobile-Firefox-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-ios-ltr-Mobile-Safari-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-ios-rtl-Mobile-Chrome-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-ios-rtl-Mobile-Firefox-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-ios-rtl-Mobile-Safari-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-md-ltr-Mobile-Chrome-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-md-ltr-Mobile-Firefox-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-md-ltr-Mobile-Safari-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-md-rtl-Mobile-Chrome-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-md-rtl-Mobile-Firefox-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-multiple-column-initial-md-rtl-Mobile-Safari-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-ios-ltr-Mobile-Chrome-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-ios-ltr-Mobile-Firefox-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-ios-ltr-Mobile-Safari-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-ios-rtl-Mobile-Chrome-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-ios-rtl-Mobile-Firefox-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-ios-rtl-Mobile-Safari-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-md-ltr-Mobile-Chrome-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-md-ltr-Mobile-Firefox-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-md-ltr-Mobile-Safari-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-md-rtl-Mobile-Chrome-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-md-rtl-Mobile-Firefox-linux.png (100%) rename core/src/components/picker-column/test/standalone/{picker-column.e2e-legacy.ts-snapshots => picker-column.e2e.ts-snapshots}/picker-single-column-initial-md-rtl-Mobile-Safari-linux.png (100%) delete mode 100644 core/src/components/picker/test/basic/picker.e2e-legacy.ts create mode 100644 core/src/components/picker/test/basic/picker.e2e.ts rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-ios-ltr-Mobile-Chrome-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-ios-ltr-Mobile-Firefox-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-ios-ltr-Mobile-Safari-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-ios-rtl-Mobile-Chrome-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-ios-rtl-Mobile-Firefox-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-ios-rtl-Mobile-Safari-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-md-ltr-Mobile-Chrome-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-md-ltr-Mobile-Firefox-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-md-ltr-Mobile-Safari-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-md-rtl-Mobile-Chrome-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-md-rtl-Mobile-Firefox-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-basic-md-rtl-Mobile-Safari-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-ios-ltr-Mobile-Chrome-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-ios-ltr-Mobile-Firefox-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-ios-ltr-Mobile-Safari-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-ios-rtl-Mobile-Chrome-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-ios-rtl-Mobile-Firefox-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-ios-rtl-Mobile-Safari-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-md-ltr-Mobile-Chrome-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-md-ltr-Mobile-Firefox-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-md-ltr-Mobile-Safari-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-md-rtl-Mobile-Chrome-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-md-rtl-Mobile-Firefox-linux.png (100%) rename core/src/components/picker/test/basic/{picker.e2e-legacy.ts-snapshots => picker.e2e.ts-snapshots}/picker-value-selected-md-rtl-Mobile-Safari-linux.png (100%) delete mode 100644 core/src/components/picker/test/is-open/picker.e2e-legacy.ts create mode 100644 core/src/components/picker/test/is-open/picker.e2e.ts delete mode 100644 core/src/components/picker/test/trigger/picker.e2e-legacy.ts create mode 100644 core/src/components/picker/test/trigger/picker.e2e.ts diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts b/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts deleted file mode 100644 index 70e81dab7f..0000000000 --- a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { test } from '@utils/test/playwright'; - -import { testPickerColumn } from '../test.utils'; - -test.describe('picker-column', () => { - test.describe('single column', () => { - test('should not have any visual regressions', async ({ page }) => { - await page.goto('/src/components/picker-column/test/standalone'); - await testPickerColumn(page, '#single-column-button', 'single'); - }); - }); - - test.describe('multiple columns', () => { - test('should not have any visual regressions', async ({ page }) => { - await page.goto('/src/components/picker-column/test/standalone'); - await testPickerColumn(page, '#multiple-column-button', 'multiple'); - }); - }); -}); diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e.ts b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts new file mode 100644 index 0000000000..e92a253ae8 --- /dev/null +++ b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts @@ -0,0 +1,22 @@ +import { configs, test } from '@utils/test/playwright'; + +import { testPickerColumn } from '../test.utils'; + +configs().forEach(({ title, screenshot, config }) => { + test.describe(title('picker-column'), () => { + test.beforeEach(async ({ page }) => { + await page.goto('/src/components/picker-column/test/standalone', config); + }); + test.describe('single column', () => { + test('should not have any visual regressions', async ({ page }) => { + await testPickerColumn(page, screenshot, '#single-column-button', 'single'); + }); + }); + + test.describe('multiple columns', () => { + test('should not have any visual regressions', async ({ page }) => { + await testPickerColumn(page, screenshot, '#multiple-column-button', 'multiple'); + }); + }); + }); +}); diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Chrome-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Firefox-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Safari-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Safari-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Chrome-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Firefox-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Safari-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Safari-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-ios-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Chrome-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Firefox-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Safari-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Safari-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Chrome-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Chrome-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Firefox-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Firefox-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Safari-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Safari-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-multiple-column-initial-md-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Chrome-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Firefox-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Safari-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Safari-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Chrome-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Firefox-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Safari-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Safari-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-ios-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Chrome-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Firefox-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Safari-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Safari-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Chrome-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Chrome-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Firefox-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Firefox-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Safari-linux.png b/core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker-column/test/standalone/picker-column.e2e-legacy.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Safari-linux.png rename to core/src/components/picker-column/test/standalone/picker-column.e2e.ts-snapshots/picker-single-column-initial-md-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/picker-column/test/test.utils.ts b/core/src/components/picker-column/test/test.utils.ts index 867086eeef..ded9d57f87 100644 --- a/core/src/components/picker-column/test/test.utils.ts +++ b/core/src/components/picker-column/test/test.utils.ts @@ -1,13 +1,19 @@ import { expect } from '@playwright/test'; -import type { E2EPage } from '@utils/test/playwright'; +import type { E2EPage, ScreenshotFn } from '@utils/test/playwright'; /** * Visual regression tests for picker-column. * @param page - The page to run the tests on. + * @param screenshot - The screenshot function to generate unique screenshot names * @param buttonSelector - The selector for the button that opens the picker. * @param description - The description to amend to the screenshot names (typically 'single' or 'multiple'). */ -export async function testPickerColumn(page: E2EPage, buttonSelector: string, description: string) { +export async function testPickerColumn( + page: E2EPage, + screenshot: ScreenshotFn, + buttonSelector: string, + description: string +) { const ionPickerDidPresentSpy = await page.spyOnEvent('ionPickerDidPresent'); await page.click(buttonSelector); @@ -15,7 +21,7 @@ export async function testPickerColumn(page: E2EPage, buttonSelector: string, de await page.waitForChanges(); - await expect(page).toHaveScreenshot(`picker-${description}-column-initial-${page.getSnapshotSettings()}.png`); + await expect(page).toHaveScreenshot(screenshot(`picker-${description}-column-initial`)); // TODO FW-3403 /* diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts b/core/src/components/picker/test/basic/picker.e2e-legacy.ts deleted file mode 100644 index 80fc17467d..0000000000 --- a/core/src/components/picker/test/basic/picker.e2e-legacy.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { expect } from '@playwright/test'; -import { test } from '@utils/test/playwright'; - -test.describe('picker: basic', () => { - test('should not have visual regressions', async ({ page }) => { - await page.goto('/src/components/picker/test/basic'); - const didPresent = await page.spyOnEvent('ionPickerDidPresent'); - const didDismiss = await page.spyOnEvent('ionPickerDidDismiss'); - - await page.click('#basic'); - await didPresent.next(); - await page.waitForChanges(); - - await expect(page).toHaveScreenshot(`picker-basic-${page.getSnapshotSettings()}.png`); - - await page.click('.picker-opt:nth-child(2)'); - await page.click('ion-picker .save-btn'); - await didDismiss.next(); - - await page.click('#basic'); - await didPresent.next(); - await page.waitForChanges(); - - await expect(page).toHaveScreenshot(`picker-value-selected-${page.getSnapshotSettings()}.png`); - }); -}); diff --git a/core/src/components/picker/test/basic/picker.e2e.ts b/core/src/components/picker/test/basic/picker.e2e.ts new file mode 100644 index 0000000000..a2cb087e53 --- /dev/null +++ b/core/src/components/picker/test/basic/picker.e2e.ts @@ -0,0 +1,28 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +configs().forEach(({ title, screenshot, config }) => { + test.describe(title('picker: basic'), () => { + test('should not have visual regressions', async ({ page }) => { + await page.goto('/src/components/picker/test/basic', config); + const didPresent = await page.spyOnEvent('ionPickerDidPresent'); + const didDismiss = await page.spyOnEvent('ionPickerDidDismiss'); + + await page.click('#basic'); + await didPresent.next(); + await page.waitForChanges(); + + await expect(page).toHaveScreenshot(screenshot(`picker-basic`)); + + await page.click('.picker-opt:nth-child(2)'); + await page.click('ion-picker .save-btn'); + await didDismiss.next(); + + await page.click('#basic'); + await didPresent.next(); + await page.waitForChanges(); + + await expect(page).toHaveScreenshot(screenshot(`picker-value-selected`)); + }); + }); +}); diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-ltr-Mobile-Chrome-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-ltr-Mobile-Firefox-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-ltr-Mobile-Safari-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-ltr-Mobile-Safari-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-rtl-Mobile-Chrome-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-rtl-Mobile-Firefox-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-rtl-Mobile-Safari-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-ios-rtl-Mobile-Safari-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-ios-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-ltr-Mobile-Chrome-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-ltr-Mobile-Firefox-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-ltr-Mobile-Safari-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-ltr-Mobile-Safari-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-rtl-Mobile-Chrome-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-rtl-Mobile-Chrome-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-rtl-Mobile-Firefox-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-rtl-Mobile-Firefox-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-rtl-Mobile-Safari-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-basic-md-rtl-Mobile-Safari-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-basic-md-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Chrome-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Firefox-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Safari-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Safari-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Chrome-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Firefox-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Safari-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Safari-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-ios-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-ltr-Mobile-Chrome-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-ltr-Mobile-Firefox-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-ltr-Mobile-Safari-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-ltr-Mobile-Safari-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-rtl-Mobile-Chrome-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-rtl-Mobile-Chrome-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-rtl-Mobile-Firefox-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-rtl-Mobile-Firefox-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-rtl-Mobile-Safari-linux.png b/core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/picker/test/basic/picker.e2e-legacy.ts-snapshots/picker-value-selected-md-rtl-Mobile-Safari-linux.png rename to core/src/components/picker/test/basic/picker.e2e.ts-snapshots/picker-value-selected-md-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/picker/test/is-open/picker.e2e-legacy.ts b/core/src/components/picker/test/is-open/picker.e2e-legacy.ts deleted file mode 100644 index e663bc9d9f..0000000000 --- a/core/src/components/picker/test/is-open/picker.e2e-legacy.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { expect } from '@playwright/test'; -import { test } from '@utils/test/playwright'; - -test.describe('picker: isOpen', () => { - test.beforeEach(async ({ page, skip }) => { - skip.rtl('isOpen does not behave differently in RTL'); - skip.mode('md', 'isOpen does not behave differently in MD'); - await page.goto('/src/components/picker/test/is-open'); - }); - - test('should open the picker', async ({ page }) => { - const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent'); - const picker = page.locator('ion-picker'); - - await page.click('#default'); - - await ionPickerDidPresent.next(); - await expect(picker).toBeVisible(); - }); - - test('should open the picker then close after a timeout', async ({ page }) => { - const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent'); - const ionPickerDidDismiss = await page.spyOnEvent('ionPickerDidDismiss'); - const picker = page.locator('ion-picker'); - - await page.click('#timeout'); - - await ionPickerDidPresent.next(); - await expect(picker).toBeVisible(); - - await ionPickerDidDismiss.next(); - await expect(picker).toBeHidden(); - }); -}); diff --git a/core/src/components/picker/test/is-open/picker.e2e.ts b/core/src/components/picker/test/is-open/picker.e2e.ts new file mode 100644 index 0000000000..d626c81ce5 --- /dev/null +++ b/core/src/components/picker/test/is-open/picker.e2e.ts @@ -0,0 +1,37 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +/** + * This behavior does not vary across modes/directions. + */ +configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { + test.describe(title('picker: isOpen'), () => { + test.beforeEach(async ({ page }) => { + await page.goto('/src/components/picker/test/is-open', config); + }); + + test('should open the picker', async ({ page }) => { + const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent'); + const picker = page.locator('ion-picker'); + + await page.click('#default'); + + await ionPickerDidPresent.next(); + await expect(picker).toBeVisible(); + }); + + test('should open the picker then close after a timeout', async ({ page }) => { + const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent'); + const ionPickerDidDismiss = await page.spyOnEvent('ionPickerDidDismiss'); + const picker = page.locator('ion-picker'); + + await page.click('#timeout'); + + await ionPickerDidPresent.next(); + await expect(picker).toBeVisible(); + + await ionPickerDidDismiss.next(); + await expect(picker).toBeHidden(); + }); + }); +}); diff --git a/core/src/components/picker/test/trigger/picker.e2e-legacy.ts b/core/src/components/picker/test/trigger/picker.e2e-legacy.ts deleted file mode 100644 index 528431fd32..0000000000 --- a/core/src/components/picker/test/trigger/picker.e2e-legacy.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { expect } from '@playwright/test'; -import { test } from '@utils/test/playwright'; - -test.describe('picker: trigger', () => { - test.beforeEach(async ({ page, skip }) => { - skip.rtl('trigger does not behave differently in RTL'); - skip.mode('md'); - await page.goto('/src/components/picker/test/trigger'); - }); - - test('should open the picker', async ({ page }) => { - const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent'); - const picker = page.locator('#default-picker'); - - await page.click('#default'); - - await ionPickerDidPresent.next(); - await expect(picker).toBeVisible(); - }); - - test('should present a previously presented picker', async ({ page }) => { - const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent'); - const ionPickerDidDismiss = await page.spyOnEvent('ionPickerDidDismiss'); - const picker = page.locator('#timeout-picker'); - - await page.click('#timeout'); - - await ionPickerDidDismiss.next(); - - await page.click('#timeout'); - - await ionPickerDidPresent.next(); - await expect(picker).toBeVisible(); - }); -}); diff --git a/core/src/components/picker/test/trigger/picker.e2e.ts b/core/src/components/picker/test/trigger/picker.e2e.ts new file mode 100644 index 0000000000..4a8ae82c77 --- /dev/null +++ b/core/src/components/picker/test/trigger/picker.e2e.ts @@ -0,0 +1,38 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +/** + * This behavior does not vary across modes/directions. + */ +configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { + test.describe(title('picker: trigger'), () => { + test.beforeEach(async ({ page }) => { + await page.goto('/src/components/picker/test/trigger', config); + }); + + test('should open the picker', async ({ page }) => { + const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent'); + const picker = page.locator('#default-picker'); + + await page.click('#default'); + + await ionPickerDidPresent.next(); + await expect(picker).toBeVisible(); + }); + + test('should present a previously presented picker', async ({ page }) => { + const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent'); + const ionPickerDidDismiss = await page.spyOnEvent('ionPickerDidDismiss'); + const picker = page.locator('#timeout-picker'); + + await page.click('#timeout'); + + await ionPickerDidDismiss.next(); + + await page.click('#timeout'); + + await ionPickerDidPresent.next(); + await expect(picker).toBeVisible(); + }); + }); +});