Skip to content

Instantly share code, notes, and snippets.

@robustdj
Last active August 29, 2015 14:02
Show Gist options
  • Save robustdj/92a3fd25b36eb6caf24e to your computer and use it in GitHub Desktop.
Save robustdj/92a3fd25b36eb6caf24e to your computer and use it in GitHub Desktop.
it 'shows items if there are pins matching current filter', ->
stubDefaultScheduledPins()
visit '/schedule'
Ember.Test.registerWaiter ->
find("#schedule .pins .pin-wrapper").length > 0
wait().then ->
findAllScheduledPinElements().length.should.be.above 0
@robustdj
Copy link
Author

@VasMan I was able to get this spec to pass by using Ember.Test.registerWaiter() which will force wait() to wait until the condition is true. It's not the prettiest solution but it passes. Hopefully using the Ember.Test.registerWaiter function helps you in your other tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment