test(e2e): add infrastructure for migration to playwright (#25033)
12
core/src/components/button/test/basic/button.e2e.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { expect, describe } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('button: basic', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.goto(`/src/components/button/test/basic`);
|
||||
|
||||
await page.setIonViewport();
|
||||
|
||||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(`button-diff-${page.getSnapshotSettings()}.png`);
|
||||
});
|
||||
});
|
After Width: | Height: | Size: 306 KiB |
After Width: | Height: | Size: 278 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 304 KiB |
After Width: | Height: | Size: 278 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 167 KiB |
After Width: | Height: | Size: 299 KiB |
After Width: | Height: | Size: 277 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 174 KiB |
After Width: | Height: | Size: 300 KiB |
After Width: | Height: | Size: 277 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 175 KiB |
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('button: basic', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/button/test/basic?ionic:_testing=true'
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|