-
Notifications
You must be signed in to change notification settings - Fork 378
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
Using during acceptance tests #98
Comments
The tl;dr is that this component listens for the I created that function for myself in the tests to cover the test suite in 1.13: https://github.com/cibernox/ember-power-select/blob/master/tests/integration/components/power-select-test.js#L73-L76 Not ideal, but this situation shouldn't last much longer. |
Hi So I upgraded to ember 2> and still not getting the results in the drop down - I guess this is something to do with the fact that my results are not local? They're the result of an ajax call... is there anything I can do to wait for the results? I am using mirage so it should be quick responding. |
If you are using methods on the In integration tests I added an explicit wait myself: https://github.com/cibernox/ember-power-select/blob/master/tests/integration/components/power-select-test.js#L1915-L1920 Another trick you can use in tests to see if the search is actually being performed is add If the event is not being triggered, I must revisit this because I don't want to force people to use anything special in Ember 2.0+ for testing. |
Actually using Ember.$.get Would it know to wait for that?
|
Ember's |
This is an example of how ic-ajax is used: https://github.com/komsit37/ember-bnb-dash/blob/56c3f8335efd15844367c0116fbf2ab1da45b29f/app/samples/dc-ajax/route.js |
OK so moved the code to use ic-ajax and still getting the same issue:
Stepping through the test I can see that there are results returned from the 'pyr' query... |
Using |
In that case perhaps it's the component the one doing something outside the instrumentation. I will check it. |
Actually that was a red herring - I didn't call done at the end. this test still fails:
Even with 3000 :p |
Hey - slack isn't loading on the train so trying here: I now have
And still do not see the drop down :/ |
Following slack conversation, will close this and add another issue to investigate behavior in acceptance test to make sure all promises are instrumented and the user doesn't need to make tests async. |
HI
In my acceptance test I want to provide the first 3 chars of a search and then select from the suggestions - the tests use Mirage for fetching remote data. My UI only has one power select.
So far I have tried:
However that doesn't seem to trigger the power select to fetch suggestions?
Whats the correct way to do this in tests?
Cheers :)
The text was updated successfully, but these errors were encountered: