We have an app built using UI router with some resolves for the routes. We are trying to to run some protractor tests against it but it seems like the default browser.get() is not waiting for ui router to fully resolve
Here is our simple test
describe('coach pages', function() {
beforeEach(function() {
browser.get("/");
});
it('should have the right title', function() {
expect(browser.getTitle()).toBe('The Title');
});
it('should have a heading', function() {
expect(element(by.css('#test')).isPresent()).toBeTruthy();
});
});
The first one passes, it finds the page title, but the heading doesnt
if we add this
browser.sleep(1000);
just before the second expect it passes?
shouldnt protractor wait for the resolves to finish by default? is it some kind of conflict with UI router?
Its worth adding that any routes that dont have resolves it does seem to wait for it as expected, it only affect routes where there is a resolve attached?