diff --git a/core/src/components/chip/test/basic/chip.e2e.ts b/core/src/components/chip/test/basic/chip.e2e.ts index 97c6bcaab4..bd30d74b2f 100644 --- a/core/src/components/chip/test/basic/chip.e2e.ts +++ b/core/src/components/chip/test/basic/chip.e2e.ts @@ -1,19 +1,84 @@ import { expect } from '@playwright/test'; import { configs, test } from '@utils/test/playwright'; -configs().forEach(({ title, screenshot, config }) => { +configs({ modes: ['ios'] }).forEach(({ title, screenshot, config }) => { + /** + * Chip rendering does not vary across modes. + */ test.describe(title('chip: rendering'), () => { test('should not have visual regressions', async ({ page }) => { - await page.goto('/src/components/chip/test/basic', config); + await page.setContent( + ` + + + + + Chip + + `, + config + ); - await page.setIonViewport(); + const chip = page.locator('ion-chip'); - await expect(page).toHaveScreenshot(screenshot(`chip-basic`)); + await expect(chip).toHaveScreenshot(screenshot(`chip-basic`)); }); }); }); configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { + /** + * This behavior does not vary across modes/directions. + */ + test.describe(title('chip: outline'), () => { + test('should render default outline chip', async ({ page }) => { + await page.setContent( + ` + + Icon + `, + config + ); + + const chip = page.locator('ion-chip'); + + await expect(chip).toHaveScreenshot(screenshot(`chip-outline`)); + }); + }); + /** + * This behavior does not vary across modes/directions. + */ + test.describe(title('chip: color'), () => { + test('should render solid color chip', async ({ page }) => { + await page.setContent( + ` + + Tertiary with Icon + `, + config + ); + + const chip = page.locator('ion-chip'); + + await expect(chip).toHaveScreenshot(screenshot(`chip-solid-color`)); + }); + test('should render outline color chip', async ({ page }) => { + await page.setContent( + ` + + Tertiary with Icon + `, + config + ); + + const chip = page.locator('ion-chip'); + + await expect(chip).toHaveScreenshot(screenshot(`chip-outline-color`)); + }); + }); + test.describe(title('chip: descenders'), () => { test('should not clip descenders in item', async ({ page }) => { test.info().annotations.push({ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Chrome-linux.png index 464b746df3..e4a97f815e 100644 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Firefox-linux.png index 892d73ca79..39fd0676a1 100644 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Safari-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Safari-linux.png index 61e32b3289..35856d6bb0 100644 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Chrome-linux.png index a18051370e..06677db025 100644 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Firefox-linux.png index d8fb2f826f..afaf4bdccb 100644 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Safari-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Safari-linux.png index 5d5f019c5e..0726f679d4 100644 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-ltr-Mobile-Chrome-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index 0ea608343a..0000000000 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-ltr-Mobile-Firefox-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index e1c70ddc7d..0000000000 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-ltr-Mobile-Safari-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-ltr-Mobile-Safari-linux.png deleted file mode 100644 index 7f269c0e28..0000000000 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-rtl-Mobile-Chrome-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index 916dbf740c..0000000000 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-rtl-Mobile-Firefox-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index a008ce9e9b..0000000000 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-rtl-Mobile-Safari-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-rtl-Mobile-Safari-linux.png deleted file mode 100644 index 663a9e2b89..0000000000 Binary files a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-basic-md-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-color-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-color-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..5d933162c7 Binary files /dev/null and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-color-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-color-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-color-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..29c0199c11 Binary files /dev/null and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-color-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-color-ios-ltr-Mobile-Safari-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-color-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..c0e0d9f90b Binary files /dev/null and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-color-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..a0a99270be Binary files /dev/null and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..584ce653f9 Binary files /dev/null and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-ios-ltr-Mobile-Safari-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..3b4307ee5a Binary files /dev/null and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-outline-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-solid-color-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-solid-color-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..351cac0a78 Binary files /dev/null and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-solid-color-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-solid-color-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-solid-color-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..63f1c58afb Binary files /dev/null and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-solid-color-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-solid-color-ios-ltr-Mobile-Safari-linux.png b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-solid-color-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..586e14251c Binary files /dev/null and b/core/src/components/chip/test/basic/chip.e2e.ts-snapshots/chip-solid-color-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts b/core/src/components/chip/test/states/chip.e2e.ts index fea2fc95ca..fb94634996 100644 --- a/core/src/components/chip/test/states/chip.e2e.ts +++ b/core/src/components/chip/test/states/chip.e2e.ts @@ -1,14 +1,43 @@ import { expect } from '@playwright/test'; import { configs, test } from '@utils/test/playwright'; -configs().forEach(({ title, screenshot, config }) => { +configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { + /** + * This behavior does not vary across modes/directions. + */ test.describe(title('chip: states'), () => { - test('should not have visual regressions', async ({ page }) => { - await page.goto('/src/components/chip/test/states', config); + test('should render disabled state', async ({ page }) => { + await page.setContent( + ` + Disabled + `, + config + ); - await page.setIonViewport(); + const chip = page.locator('ion-chip'); - await expect(page).toHaveScreenshot(screenshot(`chip-states`)); + await expect(chip).toHaveScreenshot(screenshot(`chip-disabled`)); + }); + test('should custom chip', async ({ page }) => { + await page.setContent( + ` + + + Custom + `, + config + ); + + const chip = page.locator('ion-chip'); + + await expect(chip).toHaveScreenshot(screenshot(`chip-custom`)); }); }); }); diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-custom-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-custom-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..248f01b2d4 Binary files /dev/null and b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-custom-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-custom-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-custom-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..f49aec47f1 Binary files /dev/null and b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-custom-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-custom-ios-ltr-Mobile-Safari-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-custom-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..9fea7c769a Binary files /dev/null and b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-custom-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-disabled-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-disabled-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..31ee262fa9 Binary files /dev/null and b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-disabled-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-disabled-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-disabled-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..914fa41bb4 Binary files /dev/null and b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-disabled-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-disabled-ios-ltr-Mobile-Safari-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-disabled-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..2955f0c458 Binary files /dev/null and b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-disabled-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index 3a6af4f44b..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index 6a71638603..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-ltr-Mobile-Safari-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-ltr-Mobile-Safari-linux.png deleted file mode 100644 index 677360080d..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index b007249e10..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index 3d20de38e3..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-rtl-Mobile-Safari-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-rtl-Mobile-Safari-linux.png deleted file mode 100644 index c327a60079..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-ios-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-ltr-Mobile-Chrome-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index 9b3620c797..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-ltr-Mobile-Firefox-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index cb4523a9ae..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-ltr-Mobile-Safari-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-ltr-Mobile-Safari-linux.png deleted file mode 100644 index c627632ccb..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-rtl-Mobile-Chrome-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index 528671933a..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-rtl-Mobile-Firefox-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index d7ea1fb9fb..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-rtl-Mobile-Safari-linux.png b/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-rtl-Mobile-Safari-linux.png deleted file mode 100644 index 768fb5062e..0000000000 Binary files a/core/src/components/chip/test/states/chip.e2e.ts-snapshots/chip-states-md-rtl-Mobile-Safari-linux.png and /dev/null differ