Test#wait()

wait (value) RSVP.Promisepublic

Defined in packages/ember-testing/lib/helpers.js:140

Causes the run loop to process any pending events. This is used to ensure that any async operations from other helpers (or your assertions) have been processed.

This is most often used as the return value for the helper functions (see 'click', 'fillIn','visit',etc).

Example:

1
2
3
4
5
6
7
8
Ember.Test.registerAsyncHelper('loginUser', function(app, username, password) {
  visit('secured/path/here')
  .fillIn('#username', username)
  .fillIn('#password', password)
  .click('.submit')
 
  return app.testHelpers.wait();
});

Parameters:

value Object
The value to be returned.

Returns:

RSVP.Promise
doc_EmberJs
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.