witoldsz / angular-http-auth

MIT License
2.37k stars 416 forks source link

E2E testing with Protractor #101

Open tamlyn opened 9 years ago

tamlyn commented 9 years ago

I'm trying to write some end-to-end tests for my application which uses this module. My problem is that Protractor waits for all $http requests to finish before running the tests. Since the request is intercepted, Protractor just times out:

Timed out waiting for Protractor to synchronize with the page after 11 seconds.

There's a related question on SO but no answers.

Anyone have a strategy for handling this situation?

dehru commented 9 years ago

I'm having this same issue. I'm wondering if there's a way to just tell protractor to move on....

dehru commented 9 years ago

I'm able to use this module, write a protractor test to verify login, using this.

beforeEach(function() {
   browser.ignoreSynchronization = true;
});

afterEach(function() {
   browser.ignoreSynchronization = false;
});