amCalendar causes protractor to timeout on waiting async Angular
See original GitHub issueDescription of the Issue and Steps to Reproduce:
Did you search for duplicate issue? [Yes]
Please describe the issue and steps to reproduce, preferably with a code sample / plunker:
e2e protractor tests fail after amCalendar pipe is used:
Timed out waiting for asynchronous Angular tasks to finish after 50 seconds.
Ensure your issue is isolated to angular2-moment. Issues involving third party tools will be closed unless submitted by the tool’s author/maintainer.
Environment:
Please answer the following questions:
- Angular version: 4.0.0-rc.2
- TypeScript version: 2.2.1
moment
version: 1.1.0- Are you using
moment-timezone
: no - Are you using the angular-cli: yes
- Using Rollup/Webpack/System.js/Ionic/similar?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Protractor : Failed: Timed out waiting for asynchronous ...
Here is might the issue caused by the specific structure of your application. Because on default Protractor is waiting for your Angular ...
Read more >Timeouts - Protractor - end-to-end testing for AngularJS
Because WebDriver tests are asynchronous and involve many components, there are several reasons why a timeout could occur in a Protractor test.
Read more >ngx-moment - UNPKG
75, - Fix: `amCalendar` causes protractor to timeout on waiting async Angular ([#135](https://github.com/urish/ngx-moment/pull/135), contributed by ...
Read more >Angular 2 & Protractor Timeout: Here's How to Fix It
If testing your Angular 2 application with Protractor fails with a timeout, your asynchronous operations might run in the wrong zone.
Read more >Protractor - How to use async/await - SQA Stack Exchange
async clickOnSelectCustomer () { await browser.wait(EC. ... to understand and write which in turn makes it easier to maintain as well.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, it helps 😃 Unfortunately I don’t know how to pass
ngZone
to the static method(whichinitTimer
is) so I converted it to non-static and removedrefs
as we don’t need then anymore in this case. That can cause performance issues but I don’t have good environment to test near at hand. May you have some? Please review and let me know if it is OK to leaveinitTimer
as non-static or may be you know a good way how to passngZone
to static methods. Thanks for helping.True, we don’t need it - I left you a comment. We can entirely skip the
ChangeDetectorRef
parameter toinitTimer
, also, we can remove therunOutsideAngular
call from the constructor (but keep that part that’s inside - the subscribe call)