-
Notifications
You must be signed in to change notification settings - Fork 154
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
Component unit test example #20
Component unit test example #20
Conversation
@@ -206,6 +206,10 @@ View [the library](https://github.com/yapplabs/ember-key-responder) for more inf | |||
* `ember test` | |||
* `ember test --server` | |||
|
|||
## Unit Tests | |||
|
|||
When running unit tests on components that use ember-modal-dialog it is necessary to create and register the container for ember-modal-dialog to wormhole itself into. See this [example](https://github.com/yapplabs/ember-modal-dialog/tree/master/tests/unit/components/component-that-uses-modal-dialog-test.js) for how to set this up in a unit test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to use a relative link here that will work on all branches.
Looks really good overall.. thanks!
Changed to relative links. Also found that I named the components folder wrong. Lemme know if there is anything else needs doing. |
Thanks! |
modalContainerEl.id = 'modal-overlays'; | ||
var rootEl = document.querySelector("#ember-testing"); | ||
rootEl.appendChild(modalContainerEl); | ||
this.container.register('config:modals-container-id', 'modal-overlays', {instantiate: false}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
during migration ember app from 1.13 to 2.13 found unit test with similar code. it was probably copied from related discussion. could you please provide details is this test code still relevant and how I can do that in Ember 2.0
Referencing this issue #15