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#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#unregisterHelper()

unregisterHelper (name) public Defined in packages/ember-testing/lib/test/helpers.js:91 Remove a previously added helper method. Example: Ember.Test.unregisterHelper('wait'); Parameters: name String The helper to remove.

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#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#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#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#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#pauseTest()

pauseTestObjectpublic Defined in packages/ember-testing/lib/helpers/pause_test.js:6 Available since 1.9.0 Pauses the current test - this is useful for debugging while testing or for test-driving. It allows you to inspect the state of your application at any point. Example (The test will pause before clicking the button): javascript visit('/') return pauseTest(); click('.btn'); Returns: Object A promise that will never resolve

Test#promise()

promise (resolver, label) public Defined in packages/ember-testing/lib/test/promise.js:21 This returns a thenable tailored for testing. It catches failed onSuccess callbacks and invokes the Ember.Test.adapter.exception callback in the last chained then. This method should be returned by async helpers such as wait. Parameters: resolver Function The function used to resolve the promise. label String An optional string for identifying the promise.