mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
test(e2e): update e2e tests for screenshot (#16056)
This commit is contained in:
@ -19,6 +19,7 @@ it('action-sheet: alertFromActionSheet', async () => {
|
||||
|
||||
const alert = await page.find('ion-alert');
|
||||
await alert.waitForVisible();
|
||||
await page.waitFor(100);
|
||||
|
||||
compare = await page.compareScreenshot(`alert open`);
|
||||
expect(compare).toMatchScreenshot();
|
||||
|
@ -21,6 +21,7 @@ it('alert: standalone', async () => {
|
||||
const alert = await page.find('ion-alert');
|
||||
expect(alert).not.toBe(null);
|
||||
await alert.waitForVisible();
|
||||
await page.waitFor(100);
|
||||
|
||||
const compare = await page.compareScreenshot(message);
|
||||
expect(compare).toMatchScreenshot();
|
||||
|
@ -20,7 +20,10 @@ export class App implements ComponentInterface {
|
||||
rIC(() => {
|
||||
const { win, config, queue } = this;
|
||||
|
||||
if (!config.getBoolean('_testing')) {
|
||||
importTapClick(win);
|
||||
}
|
||||
|
||||
importInputShims(win, config);
|
||||
importStatusTap(win, config, queue);
|
||||
importHardwareBackButton(win, config);
|
||||
|
@ -13,6 +13,7 @@ it('datetime: basic', async () => {
|
||||
|
||||
const picker = await page.find('ion-picker');
|
||||
await picker.waitForVisible();
|
||||
await page.waitFor(100);
|
||||
|
||||
compare = await page.compareScreenshot('should open custom picker');
|
||||
expect(compare).toMatchScreenshot();
|
||||
|
@ -10,6 +10,7 @@ it('loading: standalone', async () => {
|
||||
expect(loading).not.toBeNull();
|
||||
|
||||
await loading.waitForVisible();
|
||||
await page.waitFor(500);
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
|
@ -39,7 +39,7 @@
|
||||
await loadingController.componentOnReady();
|
||||
const loadingElement = await loadingController.create({
|
||||
message: 'Hellooo',
|
||||
duration: 2000
|
||||
duration: 5000
|
||||
});
|
||||
return await loadingElement.present();
|
||||
}
|
||||
|
@ -9,6 +9,9 @@ it('popover: standalone', async () => {
|
||||
const popover = await page.find('ion-popover');
|
||||
expect(popover).not.toBeNull();
|
||||
|
||||
await popover.waitForVisible();
|
||||
await page.waitFor(500);
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
||||
|
@ -13,6 +13,7 @@ it('select: single-value', async () => {
|
||||
|
||||
const alert = await page.find('ion-alert');
|
||||
await alert.waitForVisible();
|
||||
await page.waitFor(100);
|
||||
|
||||
compare = await page.compareScreenshot('should open gender single select');
|
||||
expect(compare).toMatchScreenshot();
|
||||
|
@ -5,6 +5,8 @@ it('slides: basic', async () => {
|
||||
url: '/src/components/slides/test/basic?ionic:_testing=true'
|
||||
});
|
||||
|
||||
await page.waitFor(500);
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
<ion-content id="content">
|
||||
<ion-slides style="background: black" id="slides" pager>
|
||||
<ion-slide style="background: red; color: white;">
|
||||
<ion-slide style="background: rgb(0, 200, 0); color: white;">
|
||||
<h1>Slide 1</h1>
|
||||
</ion-slide>
|
||||
<ion-slide style="background: white; color: blue;">
|
||||
|
@ -5,6 +5,8 @@ it('slides: standalone', async () => {
|
||||
url: '/src/components/slides/test/standalone?ionic:_testing=true'
|
||||
});
|
||||
|
||||
await page.waitFor(500);
|
||||
|
||||
const compare = await page.compareScreenshot();
|
||||
expect(compare).toMatchScreenshot();
|
||||
});
|
||||
|
@ -13,7 +13,7 @@
|
||||
<body>
|
||||
<ion-slides style="background: black" pager="true">
|
||||
|
||||
<ion-slide style="background: red; color: white;">
|
||||
<ion-slide style="background: green; color: white;">
|
||||
<h1>Slide 1</h1>
|
||||
</ion-slide>
|
||||
|
||||
|
Reference in New Issue
Block a user