question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

amCalendar causes protractor to timeout on waiting async Angular

See original GitHub issue

Description 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:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
romanovmacommented, Mar 17, 2017

Yes, it helps 😃 Unfortunately I don’t know how to pass ngZone to the static method(which initTimer is) so I converted it to non-static and removed refs 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 leave initTimer as non-static or may be you know a good way how to pass ngZone to static methods. Thanks for helping.

0reactions
urishcommented, Mar 18, 2017

True, we don’t need it - I left you a comment. We can entirely skip the ChangeDetectorRef parameter to initTimer, also, we can remove the runOutsideAngular call from the constructor (but keep that part that’s inside - the subscribe call)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found