We're writing e2e tests in async/await fashion to be able to debug them. But test that has
await browser.wait(ExpectedConditions.presenceOf(appPage.getLogo()));
Just hangs on this line. I don't know why and I don't get it. It runs fine when control flow is enabled but as soon as we disable it, it starts hanging. The test case looks like this
it('should login', async () => {
await page.navigateTo();
await page.login();
await browser.wait(ExpectedConditions.presenceOf(appPage.getLogo()));
await browser.waitForAngularEnabled(false);
expect(await browser.getCurrentUrl()).toContain('/login');
});
Idea is to wait for navigation to be complete after we login. In browser where I can see e2e execution it is clearly visible that it reached the right page and the logo is there, but it gets stuck there until timeout happens. Does anyone know why?