-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
passing a "live" ember data list to a component for integration testing #367
Comments
I have been thinking about your code here @cmcguire79 , and one rule of thumb I have is that if the things are looking strange and complicated then there is something that can be improved, so you have good idea to write me to ask that very question. |
in the application code it's been taken from the result of |
but how are you adding new model to that list then ? in the component ? can you not tell me more ? your saying the very minimal amount |
ok sorry I'll try to give you a complete picture of the app code in a route:
on the hbs that consumes this model I initialise the component:
and then in the component js:
Does this make it clearer? |
still having this problem? If you are can you make a test repo to show the issue? I was not able to grasp it clearly the last time I looked at it |
I have a component integration test where I pass through a list of models that I'm initiating with factory guy
Then in the app code I want to create a record
I think the problem is that
makeList
doesn't return a "live" array and as such isn't accessible via the storeI solved this by doing:
which works fine and is correct so far as it goes. I was just wondering if there was a more eloquent 'factory-guy' way to achieve the same thing.
Thanks
Cathal
The text was updated successfully, but these errors were encountered: