test(badge): migrate tests to playwright (#25486)
12
core/src/components/badge/test/basic/badge.e2e.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('badge: rendering', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto('/src/components/badge/test/basic');
|
||||
|
||||
await page.setIonViewport();
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot(`badge-basic-${page.getSnapshotSettings()}.png`);
|
||||
});
|
||||
});
|
After Width: | Height: | Size: 264 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 226 KiB |
After Width: | Height: | Size: 264 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 226 KiB |
After Width: | Height: | Size: 229 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 190 KiB |
After Width: | Height: | Size: 229 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 189 KiB |
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('badge: basic', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/badge/test/basic?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
12
core/src/components/badge/test/standalone/badge.e2e.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('badge: rendering', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto('/src/components/badge/test/standalone');
|
||||
|
||||
await page.setIonViewport();
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot(`badge-standalone-${page.getSnapshotSettings()}.png`);
|
||||
});
|
||||
});
|
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 55 KiB |
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('badge: standalone', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/badge/test/standalone?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|