test(spinner): migrate tests to playwright (#25259)
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('spinner: basic', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/spinner/test/basic?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
15
core/src/components/spinner/test/basic/spinner.e2e.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('spinner: basic', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/src/components/spinner/test/basic');
|
||||
});
|
||||
test.describe('spinner: visual regression tests', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.setIonViewport();
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot(`spinner-basic-diff-${page.getSnapshotSettings()}.png`);
|
||||
});
|
||||
});
|
||||
});
|
After Width: | Height: | Size: 187 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 185 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 167 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 163 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 138 KiB |
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('spinner: color', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/spinner/test/color?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
15
core/src/components/spinner/test/color/spinner.e2e.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('spinner: color', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/src/components/spinner/test/color');
|
||||
});
|
||||
test.describe('spinner: visual regression tests', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.setIonViewport();
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot(`spinner-color-diff-${page.getSnapshotSettings()}.png`);
|
||||
});
|
||||
});
|
||||
});
|
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 95 KiB |
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('spinner: standalone', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/spinner/test/standalone?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
15
core/src/components/spinner/test/standalone/spinner.e2e.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('spinner: standalone', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/src/components/spinner/test/standalone');
|
||||
});
|
||||
test.describe('spinner: visual regression tests', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.setIonViewport();
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot(`spinner-standalone-diff-${page.getSnapshotSettings()}.png`);
|
||||
});
|
||||
});
|
||||
});
|
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 23 KiB |
@ -1,17 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
// made to catch animation issues when transform is applied to host
|
||||
// example: https://github.com/ionic-team/ionic-framework/issues/19247
|
||||
test('spinner: transform', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/spinner/test/transform?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
|
||||
// wait for a bit less than the spinner's duration (to avoid looping before screenshot is taken)
|
||||
await new Promise((resolve) => setTimeout(resolve, 1500));
|
||||
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|