Test#triggerEvent()

triggerEvent (selector, context, type, options) RSVP.Promisepublic Defined in packages/ember-testing/lib/helpers/trigger_event.js:6 Available since 1.5.0 Triggers the given DOM event on the element identified by the provided selector. Example: javascript triggerEvent('#some-elem-id', 'blur'); This is actually used internally by the keyEvent helper like so: javascript triggerEvent('#some-elem-id', 'keypress', { keyCode: 13 }); Parameters: selector String jQuery selector for finding el

Test#testing

testing{Boolean}public Defined in packages/ember-testing/lib/ext/application.js:45 Available since 1.3.0 This property indicates whether or not this application is currently in testing mode. This is set when setupForTesting is called on the current application. Default: false

Test#testHelpers

testHelpers{Object}public Defined in packages/ember-testing/lib/ext/application.js:16 This property contains the testing helpers for the current application. These are created once you call injectTestHelpers on your Ember.Application instance. The included helpers are also available on the window object by default, but can be used from this object on the individual application also. Default: {}

Test#testCheckboxClick()

testCheckboxClickprivate Defined in packages/ember-testing/lib/support.js:13 This method creates a checkbox and triggers the click event to fire the passed in handler. It is used to correct for a bug in older versions of jQuery (e.g 1.8.3).

Test#setupForTesting()

setupForTestingprivate Inherited from Ember.Test but overwritten in packages/ember-testing/lib/setup_for_testing.js:14 Available since 1.5.0 Sets Ember up for testing. This is useful to perform basic setup steps in order to unit test. Use App.setupForTesting to perform integration tests (full application testing).

Test#resolve()

resolve (The) public Defined in packages/ember-testing/lib/test/promise.js:39 Available since 1.2.0 Replacement for Ember.RSVP.resolve The only difference is this uses an instance of Ember.Test.Promise Parameters: The Mixed value to resolve

Test#removeTestHelpers()

removeTestHelperspublic Defined in packages/ember-testing/lib/ext/application.js:138 This removes all helpers that have been registered, and resets and functions that were overridden by the helpers. Example: App.removeTestHelpers();

Test#registerWaiter()

registerWaiter (context, callback) public Defined in packages/ember-testing/lib/test/waiters.js:7 Available since 1.2.0 This allows ember-testing to play nicely with other asynchronous events, such as an application that is waiting for a CSS3 transition or an IndexDB transaction. For example: Ember.Test.registerWaiter(function() { return myPendingTransactions() == 0; }); The context argument allows you to optionally specify the this with which your callback will be invoked. For example:

Test#registerHelper()

registerHelper (name, helperMethod, options) public Defined in packages/ember-testing/lib/test/helpers.js:5 registerHelper is used to register a test helper that will be injected when App.injectTestHelpers is called. The helper method will always be called with the current Application as the first parameter. For example: Ember.Test.registerHelper('boot', function(app) { Ember.run(app, app.advanceReadiness); }); This helper can later be called without arguments because it will be called w

Test#registerAsyncHelper()

registerAsyncHelper (name, helperMethod) public Defined in packages/ember-testing/lib/test/helpers.js:43 Available since 1.2.0 registerAsyncHelper is used to register an async test helper that will be injected when App.injectTestHelpers is called. The helper method will always be called with the current Application as the first parameter. For example: Ember.Test.registerAsyncHelper('boot', function(app) { Ember.run(app, app.advanceReadiness); }); The advantage of an async helper is that