-
Notifications
You must be signed in to change notification settings - Fork 20
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
Automatic logout triggered by ember-user-activity and acceptance tests #136
Comments
@gilles-gosuin Thanks for pointing this out! You're right that the idle service is not "test-aware", since it just continues to operate as normal. To solve this, you could override the If you can think of a reasonable API for exposing test-friendly behavior in a better way, I'd be happy to review a PR to that effect. |
@gilles-gosuin @elwayman02 I've used ember-user-activity and was facing the same issue, Actually in addon (user-idle) service' set timeout 10ms for testing environment. You're right that the idle service is not "test-aware"
|
For those who are struggling to implement above clue, you can do something like this in your tests:
|
We're using ember-user-activity to trigger an automatic logout after IDLE_TIMEOUT.
The problem is that the logout is triggered after 10ms in acceptance tests, which is obviously not what we want.
Raising the IDLE_TIMEOUT only delays the issue, since our "andThen()s" wait for the timeout to be reached anyway.
The only solution we can imagine is to completely deactivate ember-user-activity in tests.
Is there something we're missing or is this use case not covered by the addon?
The text was updated successfully, but these errors were encountered: