Skip to content
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

Support unit and integration tests out of the box. #142

Merged

Conversation

blimmer
Copy link
Contributor

@blimmer blimmer commented Aug 19, 2016

This commit maintains the previous behavior where the initializer appends the destination element to the DOM, but allows for falling back to the #ember-testing div in the testing environment.

This resolves #78 and resolves #125

This commit maintains the previous behavior where the initializer
appends the destination element to the DOM, but allows for falling back
to the #ember-testing div in the testing environment.

This resolves yapplabs#78 and resolves yapplabs#125
@lukemelia lukemelia merged commit 42888eb into yapplabs:master Aug 19, 2016
@blimmer
Copy link
Contributor Author

blimmer commented Aug 19, 2016

Thanks!

@blimmer blimmer deleted the feature/support-unit-and-integration-tests branch August 19, 2016 23:59
@lukemelia
Copy link
Contributor

Released as 0.9.0 🎉

@aandis
Copy link

aandis commented Sep 25, 2016

After upgrading to 0.9.0, the modal doesn't render at all in my integration test. Falling back to 0.8.8 with suggested workaround

@aandis
Copy link

aandis commented Sep 25, 2016

Hm. I was able to reproduce the issue on 0.8.8 if I change the id from fancy-div to ember-testing.

@blimmer
Copy link
Contributor Author

blimmer commented Sep 25, 2016

The change in 0.9.0 is to attach modals to the ember testing div that's created by default when you're running tests. It's hard to say what's going on exactly without some sample code. Here are a few ideas, nonetheless:

  • check to see if there are multiple elements in the DOM with the target element id. it might be that there are two divs with the same ID and ember-modal-dialog is not sure how to attach it?
  • try overriding the destinationElementId in your app under app/services/modal-dialog.js similar to what's done in this PR and hard-code it to a unique element in your testing DOM

if those things don't help, could you please provide some sample code to further diagnose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

README Unit Tests link broken About integration tests
3 participants