diff --git a/core/src/components/text/test/basic/e2e.ts b/core/src/components/text/test/basic/e2e.ts deleted file mode 100644 index 0abc75087f..0000000000 --- a/core/src/components/text/test/basic/e2e.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('text: basic', async () => { - const page = await newE2EPage({ - url: '/src/components/text/test/basic?ionic:_testing=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); 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..977744a987 --- /dev/null +++ b/core/src/components/text/test/basic/text.e2e.ts @@ -0,0 +1,29 @@ +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'); + expect(await text.nth(0).screenshot()).toMatchSnapshot(`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'); + expect(await text.nth(0).screenshot()).toMatchSnapshot(`text-color-${page.getSnapshotSettings()}.png`); + }); +}); diff --git a/core/src/components/text/test/basic/text.e2e.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 new file mode 100644 index 0000000000..ecbf824ee4 Binary files /dev/null and b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-color-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/text/test/basic/text.e2e.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 new file mode 100644 index 0000000000..3614e02893 Binary files /dev/null and b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-color-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/text/test/basic/text.e2e.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 new file mode 100644 index 0000000000..c9a70797ea Binary files /dev/null and b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-color-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/text/test/basic/text.e2e.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 new file mode 100644 index 0000000000..f2baa0f026 Binary files /dev/null and b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/text/test/basic/text.e2e.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 new file mode 100644 index 0000000000..c83b38ab67 Binary files /dev/null and b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/text/test/basic/text.e2e.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 new file mode 100644 index 0000000000..a2c63f35cd Binary files /dev/null and b/core/src/components/text/test/basic/text.e2e.ts-snapshots/text-md-ltr-Mobile-Safari-linux.png differ