Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
added wait for no requests after making selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrik Folkesson authored and Fredrik Folkesson committed Jan 24, 2019
1 parent e09c3f1 commit 6380dc4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/e2e/usage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('usage', () => {

// Wait until the app has loaded data from engine
await page.waitForSelector('.model');
await wsHelper.waitUntilNoRequests(500);
await wsHelper.waitUntilNoRequests(250);

// Skip tutorial
await page.click('[data-test-id=button-skip]');
Expand All @@ -33,6 +33,7 @@ describe('usage', () => {
await page.click('[fieldz=Key_Ind_Drug]');
await page.click('[title="\'10003554-1\' (No numerical representation)"]');
await page.waitForSelector('.selection-field');
await wsHelper.waitUntilNoRequests(250);
let img = await page.screenshot({ fullPage: true });
await expect(img).to.matchImageOf('selection', OPTS);

Expand All @@ -46,14 +47,14 @@ describe('usage', () => {
await page.click('[aria-label=close]');
await page.click('.selection-field > .field');
await page.click('[title="\'10003554-2\' (No numerical representation)"]');
await wsHelper.waitUntilNoRequests(500);
await wsHelper.waitUntilNoRequests(250);

img = await page.screenshot({ fullPage: true });
await expect(img).to.matchImageOf('make-another-selection-in-selection-bar', OPTS);

// Clear selections
await page.click('.SVGInline.clear-selection');
await wsHelper.waitUntilNoRequests(500);
await wsHelper.waitUntilNoRequests(250);
img = await page.screenshot({ fullPage: true });
await expect(img).to.matchImageOf('cleared-selections', OPTS);

Expand All @@ -69,7 +70,7 @@ describe('usage', () => {
await page.click('[data-title="# Countries"]');
await page.click('[title="Add another column"]');
await page.click('[data-title="# Death by primary suspect"]');
await wsHelper.waitUntilNoRequests(500);
await wsHelper.waitUntilNoRequests(250);
img = await page.screenshot({ fullPage: true });
await expect(img).to.matchImageOf('created-hypercube', OPTS);

Expand Down

0 comments on commit 6380dc4

Please sign in to comment.