diff --git a/packages/core/src/components/typography/typography.tsx b/packages/core/src/components/typography/typography.tsx index a2f43a7991a..a759f8ce565 100644 --- a/packages/core/src/components/typography/typography.tsx +++ b/packages/core/src/components/typography/typography.tsx @@ -128,7 +128,7 @@ export class IxTypography { if (this.textColor) { style = { - color: `var(--theme-color-${this.color}-text)`, + color: `var(--theme-color-${this.textColor}-text)`, }; } diff --git a/packages/core/src/tests/typography/basic/index.html b/packages/core/src/tests/typography/basic/index.html new file mode 100644 index 00000000000..1b622c66a48 --- /dev/null +++ b/packages/core/src/tests/typography/basic/index.html @@ -0,0 +1,57 @@ + + + + + + + Stencil Component Starter + + + + + + diff --git a/packages/core/src/tests/typography/line-through/index.html b/packages/core/src/tests/typography/line-through/index.html new file mode 100644 index 00000000000..0c9c2751ba3 --- /dev/null +++ b/packages/core/src/tests/typography/line-through/index.html @@ -0,0 +1,58 @@ + + + + + + + Stencil Component Starter + + + + + + diff --git a/packages/core/src/tests/typography/text-color/index.html b/packages/core/src/tests/typography/text-color/index.html new file mode 100644 index 00000000000..b1d315ee3a8 --- /dev/null +++ b/packages/core/src/tests/typography/text-color/index.html @@ -0,0 +1,37 @@ + + + + + + + Stencil Component Starter + + + + Contrast + Std + Soft + Weak + Alarm + +
+ Inv-contrast + Inv-std + Inv-soft + Inv-weak +
+ + + + diff --git a/packages/core/src/tests/typography/typography.e2e.ts b/packages/core/src/tests/typography/typography.e2e.ts new file mode 100644 index 00000000000..e79dcd16be6 --- /dev/null +++ b/packages/core/src/tests/typography/typography.e2e.ts @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2023 Siemens AG + * + * SPDX-License-Identifier: MIT + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import { expect } from '@playwright/test'; +import { regressionTest } from '@utils/test'; + +regressionTest.describe('typography', () => { + regressionTest('basic', async ({ page }) => { + await page.goto('typography/basic'); + expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); + }); + + regressionTest('line-through', async ({ page }) => { + await page.goto('typography/line-through'); + expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); + }); + + regressionTest('underline', async ({ page }) => { + await page.goto('typography/underline'); + expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); + }); + + regressionTest('text color', async ({ page }) => { + await page.goto('typography/text-color'); + expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(); + }); +}); diff --git a/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-basic-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-basic-1-chromium---theme-classic-dark-linux.png new file mode 100644 index 00000000000..fdadd987857 Binary files /dev/null and b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-basic-1-chromium---theme-classic-dark-linux.png differ diff --git a/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-basic-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-basic-1-chromium---theme-classic-light-linux.png new file mode 100644 index 00000000000..c9c81503b8e Binary files /dev/null and b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-basic-1-chromium---theme-classic-light-linux.png differ diff --git a/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-line-through-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-line-through-1-chromium---theme-classic-dark-linux.png new file mode 100644 index 00000000000..41a2500d4a6 Binary files /dev/null and b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-line-through-1-chromium---theme-classic-dark-linux.png differ diff --git a/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-line-through-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-line-through-1-chromium---theme-classic-light-linux.png new file mode 100644 index 00000000000..e0ebb758762 Binary files /dev/null and b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-line-through-1-chromium---theme-classic-light-linux.png differ diff --git a/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-text-color-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-text-color-1-chromium---theme-classic-dark-linux.png new file mode 100644 index 00000000000..d41d21671a8 Binary files /dev/null and b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-text-color-1-chromium---theme-classic-dark-linux.png differ diff --git a/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-text-color-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-text-color-1-chromium---theme-classic-light-linux.png new file mode 100644 index 00000000000..c08c3d1303a Binary files /dev/null and b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-text-color-1-chromium---theme-classic-light-linux.png differ diff --git a/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-underline-1-chromium---theme-classic-dark-linux.png b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-underline-1-chromium---theme-classic-dark-linux.png new file mode 100644 index 00000000000..2c1e36ff5ab Binary files /dev/null and b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-underline-1-chromium---theme-classic-dark-linux.png differ diff --git a/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-underline-1-chromium---theme-classic-light-linux.png b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-underline-1-chromium---theme-classic-light-linux.png new file mode 100644 index 00000000000..d0891b38658 Binary files /dev/null and b/packages/core/src/tests/typography/typography.e2e.ts-snapshots/typography-underline-1-chromium---theme-classic-light-linux.png differ diff --git a/packages/core/src/tests/typography/underline/index.html b/packages/core/src/tests/typography/underline/index.html new file mode 100644 index 00000000000..1dce85585e3 --- /dev/null +++ b/packages/core/src/tests/typography/underline/index.html @@ -0,0 +1,58 @@ + + + + + + + Stencil Component Starter + + + + + +