I am trying to change the state of my application with clicking on a link, but it doesn't work. The console always says /home.
it('should change the route', () => {
expect(browser.getCurrentUrl().toString().endsWith("/home")).toBeTruthy();
element.all(by.css("li")).last().click();
browser.waitForAngular().then(() => {
browser.getCurrentUrl().then(text => {
console.log(text);
});
expect(browser.getCurrentUrl().toString().endsWith("/customer")).toBeTruthy();
});
});
What did I miss? The documentation of protractor isn't very helpful in context of state navigation.