fix: wrap url check in retry.try (#29536)

since the url changes are async, keep testing the url until it passes or fails enough times
This commit is contained in:
Joe Fleming 2019-01-30 11:59:50 -07:00 committed by GitHub
parent c66363a376
commit 9595ef819d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,8 +46,10 @@ export default function canvasSmokeTest({ getService, getPageObjects }) {
await retry.waitFor('workpad page', () => testSubjects.exists('canvasWorkpadPage'));
// check that workpad loaded in url
const url = await browser.getCurrentUrl();
expect(parse(url).hash).to.equal(`#/workpad/${testWorkpadId}/page/1`);
await retry.try(async () => {
const url = await browser.getCurrentUrl();
expect(parse(url).hash).to.equal(`#/workpad/${testWorkpadId}/page/1`);
});
});
it('renders elements on workpad', async () => {