diff --git a/packages/ember-testing/lib/helpers.js b/packages/ember-testing/lib/helpers.js index a4808d2bc54..f81b36e786b 100644 --- a/packages/ember-testing/lib/helpers.js +++ b/packages/ember-testing/lib/helpers.js @@ -89,9 +89,9 @@ function check(app, selector, context) { Ember.assert('To check \'' + selector + '\', the input must be a checkbox', type === 'checkbox'); - run(function() { - $el.prop('checked', true).change(); - }); + if (!$el.prop('checked')) { + app.testHelpers.click(selector, context); + } return app.testHelpers.wait(); } @@ -103,9 +103,9 @@ function uncheck(app, selector, context) { Ember.assert('To uncheck \'' + selector + '\', the input must be a checkbox', type === 'checkbox'); - run(function() { - $el.prop('checked', false).change(); - }); + if ($el.prop('checked')) { + app.testHelpers.click(selector, context); + } return app.testHelpers.wait(); }