In a test spec, I need to click a button on a web page, and wait for the new page completely loaded.
emailEl.sendKeys(\'jack\');
passwordEl.sendKeys(\'123pwd
Depending on what you want to do, you can try:
browser.waitForAngular();
or
btnLoginEl.click().then(function() {
// do some stuff
});
to solve the promise. It would be better if you can do that in the beforeEach.
NB: I noticed that the expect() waits for the promise inside (i.e. getCurrentUrl) to be solved before comparing.