mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
test(utils): migrate utils e2e tests to playwright (#26377)
This commit is contained in:
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('slides: basic', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/slides/test/basic?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
||||
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('slides: image', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/slides/test/image?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
||||
@ -1,33 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('slides: prevent-default', async () => {
|
||||
// For this specific test, _testing=false to import tap-click in app.tsx
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/slides/test/prevent-default?ionic:_testing=false',
|
||||
});
|
||||
|
||||
const screenshotCompares = [];
|
||||
|
||||
screenshotCompares.push(await page.compareScreenshot());
|
||||
|
||||
const scroller = await page.find('#scrollDownButton');
|
||||
const button = await page.find('#changeBackgroundButton');
|
||||
const contentWithBackground = await page.find('#contentWithBackground');
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
await scroller.click();
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
screenshotCompares.push(await page.compareScreenshot('scroll down button'));
|
||||
|
||||
await button.click();
|
||||
|
||||
screenshotCompares.push(await page.compareScreenshot('change background'));
|
||||
|
||||
expect(contentWithBackground).toHaveClasses(['blueBackground']);
|
||||
|
||||
for (const screenshotCompare of screenshotCompares) {
|
||||
expect(screenshotCompare).toMatchScreenshot();
|
||||
}
|
||||
});
|
||||
@ -1,10 +0,0 @@
|
||||
import { newE2EPage } from '@stencil/core/testing';
|
||||
|
||||
test('slides: vertical', async () => {
|
||||
const page = await newE2EPage({
|
||||
url: '/src/components/slides/test/vertical?ionic:_testing=true',
|
||||
});
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
||||
Reference in New Issue
Block a user