Skip to content
Snippets Groups Projects
Commit 888aed46 authored by Lotte Hofstede's avatar Lotte Hofstede
Browse files

changed sleep to wait callback

parent 7b654664
No related branches found
No related tags found
No related merge requests found
......@@ -32,9 +32,10 @@ describe('protractor SearchPage', () => {
scope.then((scopeString: string) => {
page.setCurrentScope(scopeString);
page.submitSearchForm();
browser.sleep(10);
browser.getCurrentUrl().then((url: string) => {
expect(url.indexOf('scope=' + encodeURI(scopeString))).toBeGreaterThanOrEqual(0);
browser.wait(() => {
return browser.getCurrentUrl().then((url: string) => {
return url.indexOf('scope=' + encodeURI(scopeString)) !== -1;
});
});
});
});
......@@ -43,9 +44,10 @@ describe('protractor SearchPage', () => {
const queryString = 'Another interesting query string';
page.setCurrentQuery(queryString);
page.submitSearchForm();
browser.sleep(10);
browser.getCurrentUrl().then((url: string) => {
expect(url.indexOf('query=' + encodeURI(queryString))).toBeGreaterThanOrEqual(0);
browser.wait(() => {
return browser.getCurrentUrl().then((url: string) => {
return url.indexOf('query=' + encodeURI(queryString)) !== -1;
});
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment