How do I make an e2e test with protractor where it logs in automatically.
Right now, there is code in our app.run function that goes like this
var currentUser = Parse.User.current();
$rootScope.user = null;
$rootScope.isLoggedIn = false;
if (currentUser) {
$rootScope.user = currentUser;
$rootScope.isLoggedIn = true;
$state.go('tab.home');
}
So it is depending on the local cache? Is there a way to get it to reload the app without wiping that information?
I tried having one test log in with no beforeEach information, followed by another it block that moved the app to the beginning - didn't work.
Is there a way to get it to start up fresh, so the app.run function is called?