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.

Use #ember-testing-container as a context when testing

See original GitHub issue


when updating to Ember 2.17 our tests start failing due to invalid didEnterViewport events - component with InViewport mixin was in window viewport, but was outside the #ember-testing-container viewport.

It seems that InViewport mixin should use #ember-testing-container when testing as a context instead of window here

isInViewport detection should be also changed accordingly

Happy to work on this if this makes sense.


Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

rwjbluecommented, Dec 21, 2017

Awesome, thank you for confirming @bobisjan, and I’m sorry for that specific bug 😦

We’ll try to get 2.17.2 out soon to hopefully prevent others from hitting it…

bobisjancommented, Dec 21, 2017

Thanks @rwjblue,

with ember-cli@2.17.1 and changes from ember-cli/ember-cli#7507 our tests pass ✅ with ember-in-viewmport@2.1.1 (current) and also with @snewcomer’s interesection-observer branch 🎊.

So, I think that this issue can be closed ☺️.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing your Ember application in 2018 - DockYard
Using a few strategies we already talked about, we can now see if an element is outside the scope of the #ember-testing container....
Read more >
Introduction - Testing - Ember Guides
Testing is a core part of the Ember framework and its development cycle. Let's assume you are writing an Ember application which will...
Read more >
The Ember.js testing guide, I made for myself - Medium
app-context is the value of modulePrefix specified in the application's environment.js . module is used to group similar tests together. A basic unit...
Read more >
How to test React Context
The best way to test Context is to make our tests unaware of its ... same way that developers would use them (behavioral...
Read more >
Testing - Spring
context package) provides generic, annotation-driven unit and integration testing support that is agnostic of the testing framework in use. The ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found