Currently, I am in the process of creating a series of end-to-end tests using Protractor and Jasmine. I began by writing the following test:
describe('app login page', function() {
it('should be redirected to /#/login', function() {
browser.get('http://127.0.0.1:8090');
jasmine.log(window.location.pathname);
expect(window.location.pathname).toEqual('/#/login');
});
});
However, it seems to be failing in the console. I am encountering the error message
ReferenceError: window is not defined
. I am seeking a solution to successfully test these redirects. Can anyone provide guidance on how to handle this issue?