Integration tests failing due to missing `service:-document`
See original GitHub issueI am currently unable to test a component’s use of {{ember-power-select}}
in an integration test, due to a missing injection related to ember-basic-dropdown
’s use of ember-wormhole
. Acceptance tests work fine.
For reference, I don’t believe this deficiency is related directly to ember-basic-dropdown
or its consumers, but folks may find this helpful when researching why their integration tests are failing.
To replicate:
- Create a custom component that implements an
ember-basic-dropdown
- Render the custom component in an integration test
- Invoke the
clickTrigger
helper - [your test should now be throwing]
The same symptoms have been observed in ember-wormhole
; an issue is being tracked upstream at https://github.com/yapplabs/ember-wormhole/issues/77
h/t @chundabear, who first saw this and was instrumental in tracing the error 😃
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Failing at Integration Testing: Common Mistakes - TestQuality
Integration tests are slow and difficult to maintain because they have substantially more system touch points than unit tests and hence ...
Read more >Integration Testing vs Failing Fast - Vladimir Khorikov
This bug reveals itself with the first execution and thus is easy to notice and fix. It also doesn't lead to data corruption....
Read more >Integration test fails all unit tests succeed, whats the conclusion?
First you have to determine where the problems are at. Are your unit tests relevant? This includes: Do they have meaningful asserts?
Read more >How to Fix Flaky Tests - Semaphore CI
Randomly failing tests are the hardest to debug. Here's a framework you can use to fix them and keep your test suite healthy....
Read more >Integration Tests · microsoft/vscode-jupyter Wiki - GitHub
Solution: You might not have your environment setup correctly. Try debugging the test setup or suite setup to see if something fails earlier....
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
🤣
Manually registering
service:-document
as @gaurav0 described in https://github.com/yapplabs/ember-wormhole/issues/77#issuecomment-276827442 works for our suite 👍@cibernox would you be interested in a contrib that registers this for the consuming app if they’re using Ember 2.6 / 2.7? Else others can stumble on this issue while Googling 😃