-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Introduce registerSelectHelper
#14
Introduce registerSelectHelper
#14
Conversation
I haven't seen a proper example of how to bundle an async test helper, so if you don't think this is a good approach, let me know. |
Thanks for the PR! It looks like there's a build error. Can you update the acceptance tests to use this helper? Also, let's add the index version so that I can say: select('.my-select-box', 'option text') as well as select('.my-select-box', 2) |
adopted-ember-addons#13 Adds the `select` helper to deal with integration level tests. Closes adopted-ember-addons#13.
2496df7
to
5b6adf2
Compare
@cowboyd I've fixed the imports / syntax errors in the helper itself. Could you point me to where in the acceptance tests I could use the helper? It seems like everything is done synchronously and at the controller level, not the application level |
@seanpdoyle it looks like the tests are hanging for some reason. Have you had a chance to look at this? |
@cowboyd not yet. Hopefully I'll get around to it on Friday |
this.selected = true; | ||
Ember.$(this).trigger('change'); | ||
}); | ||
}); |
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.
@seanpdoyle I decided to checkout this branch and see why Travis is hanging. It seems you can't use the fat arrow OR the string interpolation here.
Refactored (and not as nice ES6 😦 ) code:
var $el = app.testHelpers.findWithAssert(selector + "option:contains('" + text + "')");
$el.each(function() {
var _this = this;
Ember.run(function() {
_this.selected = true;
Ember.$(_this).trigger('change');
});
});
@Robdel12 👏 for doing the leg work |
@seanpdoyle no problem! :p |
#13
Adds the
select
helper to deal with integration level tests.Closes #13.