test(chip): migrate tests to playwright (#25487)
12
core/src/components/chip/test/basic/chip.e2e.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('chip: rendering', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto('/src/components/chip/test/basic');
|
||||
|
||||
await page.setIonViewport();
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot(`chip-basic-${page.getSnapshotSettings()}.png`);
|
||||
});
|
||||
});
|
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 154 KiB |
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 154 KiB |
After Width: | Height: | Size: 168 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 167 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 148 KiB |
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('chip: basic', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/chip/test/basic?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
12
core/src/components/chip/test/standalone/chip.e2e.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('chip: standalone', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto('/src/components/chip/test/standalone');
|
||||
|
||||
await page.setIonViewport();
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot(`chip-standalone-${page.getSnapshotSettings()}.png`);
|
||||
});
|
||||
});
|
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 164 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 141 KiB |
After Width: | Height: | Size: 163 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 141 KiB |
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('chip: standalone', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/chip/test/standalone?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
12
core/src/components/chip/test/states/chip.e2e.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('chip: states', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto('/src/components/chip/test/states');
|
||||
|
||||
await page.setIonViewport();
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot(`chip-states-${page.getSnapshotSettings()}.png`);
|
||||
});
|
||||
});
|
After Width: | Height: | Size: 380 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 348 KiB |
After Width: | Height: | Size: 379 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 347 KiB |
After Width: | Height: | Size: 376 KiB |
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 335 KiB |
After Width: | Height: | Size: 374 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 334 KiB |
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('chip: states', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/chip/test/states?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|