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

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 13:00:41 -07:00 committed by GitHub
parent 708279b97f
commit 43dc53f17a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,8 +49,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 () => {