diff --git a/core/src/components/text/test/basic/text.e2e-legacy.ts b/core/src/components/text/test/basic/text.e2e-legacy.ts deleted file mode 100644 index e5b69fb57c..0000000000 --- a/core/src/components/text/test/basic/text.e2e-legacy.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { expect } from '@playwright/test'; -import { test } from '@utils/test/playwright'; - -test.describe('text: basic', () => { - test.beforeEach(({ skip }) => { - skip.rtl(); - skip.mode('ios', 'Text does not have per-mode styles'); - }); - test('should render default text', async ({ page }) => { - await page.setContent(` - - The quick brown fox jumps over the lazy dog - - `); - - const text = page.locator('ion-text'); - await expect(text.nth(0)).toHaveScreenshot(`text-${page.getSnapshotSettings()}.png`); - }); - test('should render text with color prop', async ({ page }) => { - await page.setContent(` - - The quick brown fox jumps over the lazy dog - - `); - - const text = page.locator('ion-text'); - await expect(text.nth(0)).toHaveScreenshot(`text-color-${page.getSnapshotSettings()}.png`); - }); -}); diff --git a/core/src/components/text/test/basic/text.e2e.ts b/core/src/components/text/test/basic/text.e2e.ts new file mode 100644 index 0000000000..a98baa015d --- /dev/null +++ b/core/src/components/text/test/basic/text.e2e.ts @@ -0,0 +1,36 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +/** + * Text does not have per-mode styles + */ +configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { + test.describe(title('text: basic'), () => { + test('should render default text', async ({ page }) => { + await page.setContent( + ` + + The quick brown fox jumps over the lazy dog + + `, + config + ); + + const text = page.locator('ion-text'); + await expect(text.nth(0)).toHaveScreenshot(screenshot(`text`)); + }); + test('should render text with color prop', async ({ page }) => { + await page.setContent( + ` + + The quick brown fox jumps over the lazy dog + + `, + config + ); + + const text = page.locator('ion-text'); + await expect(text.nth(0)).toHaveScreenshot(screenshot(`text-color`)); + }); + }); +}); diff --git a/core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-color-md-ltr-Mobile-Chrome-linux.png b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-color-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-color-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/text/test/basic/text.e2e.ts-snapshots/text-color-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-color-md-ltr-Mobile-Firefox-linux.png b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-color-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-color-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/text/test/basic/text.e2e.ts-snapshots/text-color-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-color-md-ltr-Mobile-Safari-linux.png b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-color-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-color-md-ltr-Mobile-Safari-linux.png rename to core/src/components/text/test/basic/text.e2e.ts-snapshots/text-color-md-ltr-Mobile-Safari-linux.png diff --git a/core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-md-ltr-Mobile-Chrome-linux.png b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-md-ltr-Mobile-Chrome-linux.png similarity index 100% rename from core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-md-ltr-Mobile-Chrome-linux.png rename to core/src/components/text/test/basic/text.e2e.ts-snapshots/text-md-ltr-Mobile-Chrome-linux.png diff --git a/core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-md-ltr-Mobile-Firefox-linux.png b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-md-ltr-Mobile-Firefox-linux.png similarity index 100% rename from core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-md-ltr-Mobile-Firefox-linux.png rename to core/src/components/text/test/basic/text.e2e.ts-snapshots/text-md-ltr-Mobile-Firefox-linux.png diff --git a/core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-md-ltr-Mobile-Safari-linux.png b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-md-ltr-Mobile-Safari-linux.png similarity index 100% rename from core/src/components/text/test/basic/text.e2e-legacy.ts-snapshots/text-md-ltr-Mobile-Safari-linux.png rename to core/src/components/text/test/basic/text.e2e.ts-snapshots/text-md-ltr-Mobile-Safari-linux.png