-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Multiple calls to handleCreate() don't work #76
Comments
I'll make this a puzzle for you @pixelterra Check out the sample acceptance test from the docs, and see if you can spot what you forgot to add to your test. Hints provided if you don't get it in 30 seconds. |
Ah setup teardown. :) Lemme give that a go... |
Ooo. that broke everything :( |
Yikes .. really .. hmm .. now I am puzzled. |
I'm on 0.2.3 btw |
Me too, but let me check that gist again. |
Error: Assertion Failed: You cannot use the same root element (#ember-testing) multiple times in an Ember.Application |
Updated gist: |
I think I know the reason. Get newest version of ember-data-factory-guy .. First: |
I have "ember-data-factory-guy": "1.0.2", |
Yes, 1.0.3 |
Hmm .. tricky .. actually 1.0.2 should work ok .. but if you get 1.0.3 .. at least you'll be on the same page as I am, so I can help out easier. |
hm |
Yeah . I know .. sounds fishy. |
installing now |
actually going to standup with my team in a sec... |
but I have 2 mins |
actually that seems to have fixed everything |
is this setup() and teardown() for FG new? |
no .. it's been there ( in that FactoryGuyTestHelper ) .. for ever .. |
well for whatever reason, that fixed everything... |
whew .. glad that worked .. I was starting to think my fingernails were getting tasty there for a second. |
So, just for fun, try omitting the setup, and you'll see that those last 3 tests run slower |
This discussion actually showed me a bug .. which I fixed, and pushed out a new version 1.0.4. |
Closing this since issue resolved. |
I have a test file with multiple test() calls. Inside two I have calls to handleCreate(). Each test run individually succeeds, but together they fail since only the first call to handleCreate() "takes" or "sticks".
https://gist.github.com/pixelterra/cd4e6d7ac3e4794bdf58
This is pretty surprising behavior to me. I would assume that only the "last" call to handleCreate() would be "active".
I suppose that I could work around this by using the match() method and tracking which data is used in each call, but this seems unnecssary and could get messy with many calls to handleCreate().
Is this the only option or am I missing something?
The text was updated successfully, but these errors were encountered: