I've got an Angular application which I want to test. It has login section and I need to know somehow whether it worked fine (it sent login data, opened a socket connection, redirected to the apps depth and a route guard didn't prevent that redirection).
I've tried
it('should log in', () => {
page.navigateTo();
page.fillInputs();
page.logIn();
browser.waitForAngular();
browser.wait(() => {
return urlContains('dashboard');
}, 2000);
});
And it succeeds even if I do fill field with incorrect data and the app doesn't do any redirects. How do I achieve this redirect await and then checking the url?
I'm using Angular 6 if it's important.
Yes, I've seen a similar topic with answer that I don't understand.
Aucun commentaire:
Enregistrer un commentaire