diff --git a/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts new file mode 100644 index 0000000000..005184f927 --- /dev/null +++ b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts @@ -0,0 +1,42 @@ +import { configs, test } from '@utils/test/playwright'; + +import { ActionSheetFixture } from './fixture'; + +configs().forEach(({ config, screenshot, title }) => { + test.describe(title('action sheet: variant rendering'), () => { + let actionSheetFixture!: ActionSheetFixture; + test.beforeEach(async ({ page }) => { + actionSheetFixture = new ActionSheetFixture(page, screenshot); + + await page.goto(`/src/components/action-sheet/test/basic`, config); + }); + test('should open basic action sheet', async () => { + await actionSheetFixture.open('#basic'); + await actionSheetFixture.screenshot('basic'); + + /** + * We want to test that the dismiss method + * actually works, but we do not need to test + * it every time. As a result, we only + * call dismiss in this test. + */ + await actionSheetFixture.dismiss(); + }); + test('should open cancel only action sheet', async () => { + await actionSheetFixture.open('#cancelOnly'); + await actionSheetFixture.screenshot('cancel-only'); + }); + test('should open custom action sheet', async () => { + await actionSheetFixture.open('#custom'); + await actionSheetFixture.screenshot('custom'); + }); + test('should open scrollable action sheet', async () => { + await actionSheetFixture.open('#scrollableOptions'); + await actionSheetFixture.screenshot('scrollable-options'); + }); + test('should open scrollable action sheet without cancel', async () => { + await actionSheetFixture.open('#scrollWithoutCancel'); + await actionSheetFixture.screenshot('scroll-without-cancel'); + }); + }); +}); diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-ios-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-basic-diff-md-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-ios-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-cancel-only-diff-md-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-ios-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-ios-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scroll-without-cancel-diff-md-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-ios-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Chrome-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Chrome-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Firefox-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Firefox-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/action-sheet/test/basic/action-sheet.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Safari-linux.png rename to core/src/components/action-sheet/test/basic/action-sheet-rendering.e2e.ts-snapshots/action-sheet-scrollable-options-diff-md-rtl-Mobile-Safari-linux.png diff --git a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts b/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts index 92f716f330..2483a0b8f4 100644 --- a/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts +++ b/core/src/components/action-sheet/test/basic/action-sheet.e2e.ts @@ -1,9 +1,12 @@ import { expect } from '@playwright/test'; -import type { Locator } from '@playwright/test'; import { configs, test } from '@utils/test/playwright'; -import type { E2EPage } from '@utils/test/playwright'; -configs({ directions: ['ltr'] }).forEach(({ config, title }) => { +import { ActionSheetFixture } from './fixture'; + +/** + * This behavior does not vary across modes/directions + */ +configs({ mode: ['ios'], directions: ['ltr'] }).forEach(({ config, title }) => { test.describe(title('action sheet: data'), () => { let actionSheetFixture!: ActionSheetFixture; test.beforeEach(async ({ page }) => { @@ -35,58 +38,11 @@ configs({ directions: ['ltr'] }).forEach(({ config, title }) => { }); }); }); -configs({ directions: ['ltr'] }).forEach(({ config, title }) => { - test.describe(title('action sheet: attributes'), () => { - test('should set htmlAttributes', async ({ page }) => { - await page.goto(`/src/components/action-sheet/test/basic`, config); - const actionSheetFixture = new ActionSheetFixture(page); - await actionSheetFixture.open('#basic'); - - const actionSheet = page.locator('ion-action-sheet'); - await expect(actionSheet).toHaveAttribute('data-testid', 'basic-action-sheet'); - }); - }); -}); -configs().forEach(({ config, screenshot, title }) => { - test.describe(title('action sheet: variant rendering'), () => { - let actionSheetFixture!: ActionSheetFixture; - test.beforeEach(async ({ page }) => { - actionSheetFixture = new ActionSheetFixture(page, screenshot); - - await page.goto(`/src/components/action-sheet/test/basic`, config); - }); - test('should open basic action sheet', async () => { - await actionSheetFixture.open('#basic'); - await actionSheetFixture.screenshot('basic'); - - /** - * We want to test that the dismiss method - * actually works, but we do not need to test - * it every time. As a result, we only - * call dismiss in this test. - */ - await actionSheetFixture.dismiss(); - }); - test('should open cancel only action sheet', async () => { - await actionSheetFixture.open('#cancelOnly'); - await actionSheetFixture.screenshot('cancel-only'); - }); - test('should open custom action sheet', async () => { - await actionSheetFixture.open('#custom'); - await actionSheetFixture.screenshot('custom'); - }); - test('should open scrollable action sheet', async () => { - await actionSheetFixture.open('#scrollableOptions'); - await actionSheetFixture.screenshot('scrollable-options'); - }); - test('should open scrollable action sheet without cancel', async () => { - await actionSheetFixture.open('#scrollWithoutCancel'); - await actionSheetFixture.screenshot('scroll-without-cancel'); - }); - }); -}); -configs({ directions: ['ltr'] }).forEach(({ config, title }) => { +/** + * This behavior does not vary across modes/directions + */ +configs({ mode: ['ios'], directions: ['ltr'] }).forEach(({ config, title }) => { test.describe(title('action sheet: variant functionality'), () => { let actionSheetFixture!: ActionSheetFixture; test.beforeEach(async ({ page }) => { @@ -118,7 +74,11 @@ configs({ directions: ['ltr'] }).forEach(({ config, title }) => { }); }); }); -configs({ directions: ['ltr'] }).forEach(({ config, title }) => { + +/** + * This behavior does not vary across modes/directions + */ +configs({ mode: ['ios'], directions: ['ltr'] }).forEach(({ config, title }) => { test.describe(title('action sheet: focus trap'), () => { test('it should trap focus in action sheet', async ({ page, browserName }) => { await page.goto(`/src/components/action-sheet/test/basic`, config); @@ -140,42 +100,3 @@ configs({ directions: ['ltr'] }).forEach(({ config, title }) => { }); }); }); - -class ActionSheetFixture { - readonly page: E2EPage; - readonly screenshotFn?: (file: string) => string; - - private actionSheet!: Locator; - - constructor(page: E2EPage, screenshot?: (file: string) => string) { - this.page = page; - this.screenshotFn = screenshot; - } - - async open(selector: string) { - const ionActionSheetDidPresent = await this.page.spyOnEvent('ionActionSheetDidPresent'); - await this.page.locator(selector).click(); - await ionActionSheetDidPresent.next(); - this.actionSheet = this.page.locator('ion-action-sheet'); - await expect(this.actionSheet).toBeVisible(); - } - - async dismiss() { - const ionActionSheetDidDismiss = await this.page.spyOnEvent('ionActionSheetDidDismiss'); - await this.actionSheet.evaluate((el: HTMLIonActionSheetElement) => el.dismiss()); - await ionActionSheetDidDismiss.next(); - await expect(this.actionSheet).not.toBeVisible(); - } - - async screenshot(modifier: string) { - const { screenshotFn } = this; - - if (!screenshotFn) { - throw new Error( - 'A screenshot function is required to take a screenshot. Pass one in when creating ActionSheetFixture.' - ); - } - - await expect(this.actionSheet).toHaveScreenshot(screenshotFn(`action-sheet-${modifier}-diff`)); - } -} diff --git a/core/src/components/action-sheet/test/basic/action-sheet.spec.tsx b/core/src/components/action-sheet/test/basic/action-sheet.spec.tsx new file mode 100644 index 0000000000..4343a95f4a --- /dev/null +++ b/core/src/components/action-sheet/test/basic/action-sheet.spec.tsx @@ -0,0 +1,17 @@ +import { h } from '@stencil/core'; +import { newSpecPage } from '@stencil/core/testing'; + +import { ActionSheet } from '../../action-sheet'; + +describe('action sheet: htmlAttributes inheritance', () => { + it('should correctly inherit attributes on host', async () => { + const page = await newSpecPage({ + components: [ActionSheet], + template: () => , + }); + + const actionSheet = page.body.querySelector('ion-action-sheet'); + + await expect(actionSheet.getAttribute('data-testid')).toBe('basic-action-sheet'); + }); +}); diff --git a/core/src/components/action-sheet/test/basic/fixture.ts b/core/src/components/action-sheet/test/basic/fixture.ts new file mode 100644 index 0000000000..b7316d5330 --- /dev/null +++ b/core/src/components/action-sheet/test/basic/fixture.ts @@ -0,0 +1,42 @@ +import type { Locator } from '@playwright/test'; +import { expect } from '@playwright/test'; +import type { E2EPage } from '@utils/test/playwright'; + +export class ActionSheetFixture { + readonly page: E2EPage; + readonly screenshotFn?: (file: string) => string; + + private actionSheet!: Locator; + + constructor(page: E2EPage, screenshot?: (file: string) => string) { + this.page = page; + this.screenshotFn = screenshot; + } + + async open(selector: string) { + const ionActionSheetDidPresent = await this.page.spyOnEvent('ionActionSheetDidPresent'); + await this.page.locator(selector).click(); + await ionActionSheetDidPresent.next(); + this.actionSheet = this.page.locator('ion-action-sheet'); + await expect(this.actionSheet).toBeVisible(); + } + + async dismiss() { + const ionActionSheetDidDismiss = await this.page.spyOnEvent('ionActionSheetDidDismiss'); + await this.actionSheet.evaluate((el: HTMLIonActionSheetElement) => el.dismiss()); + await ionActionSheetDidDismiss.next(); + await expect(this.actionSheet).not.toBeVisible(); + } + + async screenshot(modifier: string) { + const { screenshotFn } = this; + + if (!screenshotFn) { + throw new Error( + 'A screenshot function is required to take a screenshot. Pass one in when creating ActionSheetFixture.' + ); + } + + await expect(this.actionSheet).toHaveScreenshot(screenshotFn(`action-sheet-${modifier}-diff`)); + } +}