-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
Reset ember-testing div to initial state on teardown #180
Conversation
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.
Generally, looks good.
I see the test that ensures the fixture contents are reset (which AFAICT would have passed before these changes), but I'd like to have a test that ensures the fixture contents are not wiped between tests (to ensure that your actual desired scenario works). Can you add a test for that?
let element = document.createElement('div'); | ||
element.setAttribute('id', 'ember-testing'); | ||
|
||
document.body.appendChild(element); | ||
this.fixture = ''; | ||
} else { | ||
this.fixture = testEl.innerHTML; |
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.
Can you change this to this.fixtureResetValue
, and initialize it in the constructor?
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.
I can change the name. For initialization, I originally tried it in the constructor, but test-module
overrides init
and doesn't call _super
so it never gets set in that scenario. I could add it in both locations, but I figured this was cleaner. Does cause the shape to morph, but figured since this was just a testing environment that it's not a huge deal.
@trentmwillis - ping? |
Sorry @rwjblue got pulled into a bunch of Engines work, will try to wrap this up today. |
cc459e7
to
b94785f
Compare
@rwjblue changed the property name and added another test (was a pain to figure out how to test it). |
@rwjblue any updates on this? |
Addresses #178