Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull master #24

Merged
merged 9 commits into from
Jan 15, 2019
Prev Previous commit
Next Next commit
test(e2e): fix e2e screenshot wait (ionic-team#17110)
  • Loading branch information
adamdbradley authored Jan 14, 2019
commit 003eb2faffba7bc9f7c8654a1a3c480e4a4ed88f
10 changes: 6 additions & 4 deletions core/src/components/item/test/inputs/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ test('item: inputs', async () => {
// check form
await page.click('#submit');
await checkFormResult(page, '{"date":"","select":"n64","toggle":"","input":"","input2":"","checkbox":""}');
await page.waitFor(100);

// Default case, enabled and no value
let compare = await page.compareScreenshot();
expect(compare).toMatchScreenshot();

// Disable everything
await page.click('#btnDisabled');
await page.waitFor(250);

// check form
await page.click('#submit');
await checkFormResult(page, '{}');
await page.waitFor(100);

// screenshot
compare = await page.compareScreenshot('should disable all');
Expand All @@ -33,27 +34,28 @@ test('item: inputs', async () => {
// check form
await page.click('#submit');
await checkFormResult(page, '{"date":"2016-12-09","select":"nes","toggle":"on","input":"Some text","input2":"Some text","checkbox":"on"}');
await page.waitFor(100);

compare = await page.compareScreenshot('should reenable and set value');
expect(compare).toMatchScreenshot();

// Set "null"
await page.click('#btnNullValue');
await page.waitFor(250);
await page.waitFor(100);

compare = await page.compareScreenshot('should set null');
expect(compare).toMatchScreenshot();

// Set "empty"
await page.click('#btnEmptyValue');
await page.waitFor(250);
await page.waitFor(100);

compare = await page.compareScreenshot('should set empty');
expect(compare).toMatchScreenshot();

// Set "empty"
await page.click('#btnEmptyValue');
await page.waitFor(250);
await page.waitFor(100);

compare = await page.compareScreenshot('should set empty');
expect(compare).toMatchScreenshot();
Expand Down
6 changes: 6 additions & 0 deletions core/src/components/menu/test/basic/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ test('menu: basic', async () => {
]);

await start.callMethod('open');
await start.waitForVisible();
await page.waitFor(250);
expect(await page.compareScreenshot('start menu')).toMatchScreenshot();

await start.callMethod('close');
await page.waitFor(250);

const end = await page.find('ion-menu[side="end"]');
expect(end).toHaveClasses([
Expand All @@ -24,5 +28,7 @@ test('menu: basic', async () => {
]);

await end.callMethod('open');
await end.waitForVisible();
await page.waitFor(250);
expect(await page.compareScreenshot('end menu')).toMatchScreenshot();
});
6 changes: 6 additions & 0 deletions core/src/components/menu/test/standalone/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ test('menu: standalone', async () => {
]);

await start.callMethod('open');
await start.waitForVisible();
await page.waitFor(250);
expect(await page.compareScreenshot('start menu')).toMatchScreenshot();

await start.callMethod('close');
await page.waitFor(250);

const end = await page.find('ion-menu[side="end"]');
expect(end).toHaveClasses([
Expand All @@ -25,5 +29,7 @@ test('menu: standalone', async () => {
]);

await end.callMethod('open');
await end.waitForVisible();
await page.waitFor(250);
expect(await page.compareScreenshot('end menu')).toMatchScreenshot();
});