-
Notifications
You must be signed in to change notification settings - Fork 2.3k
mixing angular/non angular pages #89
Comments
First thing I notice is there's not expectation in your test. Try adding an expectation to the Are you using a |
I think you'll need to wrap your setup in a beforeEach() block, or else the asynchronous login might not be waited for. Of course you probably only want to do login one before all your tests run, not before each. Really, this should be in a beforeAll (or before.once or something), but Jasmine doesn't support that syntax right now. (It will in 2.0). For now, I'd rely on the fact that it() blocks are executed in order, and make your first it() block do login: var util = require('util');
describe("security", function () {
describe('login', function () {
var ptor = protractor.getInstance();
var driver = ptor.driver;
var findByName = function (name) {
return driver.findElement(protractor.By.name(name));
};
it('does beforeAll setup', function() {
driver.get('http://localhost/ecdt/');
findByName('UserName').sendKeys('xxx');
findByName('Password').sendKeys('xxx');
findByName('logIn').click();
});
it('userCreate', function () {
ptor.get('#/usercreate');
ptor.findElement(protractor.By.input('firstName')).sendKeys('Julie'); //hangs here
}, 20000);
});
}); |
Now, this can also be done in the |
Hello,
I'm stuck: my application is hosted inside an asp.net mvc web site. Everything is done in angular except login/logout, handled by asp.net authentication.
I can log in but when I go to an angular page, it hangs on this:
08:53:00.080 INFO - Executing: [execute async script: return (function () {
var el = document.querySelector(arguments[0]);
var callback = arguments[1];
angular.element(el).injector().get('$browser').
notifyWhenNoOutstandingRequests(callback);
}).apply(null, arguments);, [div#data-ng-app]] at URL: /session/b06710f2-0c8c-40
83-acea-1cf6f0114dfa/execute_async)
My ng-app is also set on a div and configured with the rootElement('div#data-ng-app') in the configuration.
here is my test:
I can test any angular app but not mine :)
Does anybody have an idea on how to handle that situation?
The text was updated successfully, but these errors were encountered: