I\'m beginner in the e2e testing and have a problem. When I do login - I make redirect from login.php to index.php page. But my test is fails with following errors:
You are getting timeout because you've injected a param into it
callback and never called that (read more on that here). You should remove the param, or call it when the test is over. Basically, you don't do any custom async stuff, so you don't need it.
So the question is how I can wait when my page will reload and check url?
I'd suggest that you waited for a specific element on index.php
page:
it('should login and redirect to overview page with CR Operators rights', function() {
element(by.model('username')).clear().sendKeys('testuser');
element(by.model('password')).clear().sendKeys('test');
element(by.css('[type="submit"]')).click();
browser.wait(protractor.until.elementLocated(by.css('Log out'));
expect(element(by.css('body')).getText()).toContain('Hello, you are Logged In!');
});