Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protractor tests : using $interval instead of $timeout for notify duration management #41

Open
mpellerin42 opened this issue Aug 26, 2015 · 4 comments

Comments

@mpellerin42
Copy link

Hi,

I use this module in my application, and I started to write e2e tests with protractor.
There is no problem when writing tests for function using notification which stay on screen, but notification with duration attribute are not testable. This issue comes from the $timeout service to manage notification duration : protractor waits for $timeouts (and $http) before to run actions and expectation. So notification with duration can't be tested as they disappears before protractor tests them.
In documentation (https://github.com/angular/protractor/blob/master/docs/timeouts.md), protractor team precognise to replace $timeout services by $interval services to this kind of issue.

Can you try that to allow protractor testing of notifications with duration ?

@holm
Copy link

holm commented Oct 7, 2015

👍 We are running into the same issue, and using $interval would solve a big headache for us.

@holm
Copy link

holm commented Oct 9, 2015

I have made a fork that changes to $interval here: https://github.com/peakon/angular-notify

@samudurand
Copy link

Coud that be used in the main branch ? Otherwise we will have to implement our own...

@mpospelov
Copy link

@holm thanks for your fork, it works for me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants