Skip to content

Commit

Permalink
Add refresh and wait to integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjbauer committed Apr 17, 2019
1 parent 3567930 commit bc6072c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/frontend-integration-test/helloworld.spec.js
Expand Up @@ -229,9 +229,18 @@ describe('deploy helloworld sample run', () => {
});

it('displays both runs in all runs page', () => {
$('.tableRow').waitForVisible();
const rows = $$('.tableRow').length;
assert(rows === 2, 'there should now be two runs in the table, instead there are: ' + rows);
let attempts = 30;

// Wait for a reasonable amount of time until the run starts
while (attempts && $$('.tableRow').length !== 2) {
browser.pause(1000);
if (browser.isVisible('#refreshBtn')) {
$('#refreshBtn').click();
}
--attempts;
}

assert(attempts, `waited for 30 seconds but table had ${$$('.tableRow').length} entries.`);
});

it('navigates back to the experiment list', () => {
Expand Down

0 comments on commit bc6072c

Please sign in to comment.