Ember Native DOM Helpers (`ember-native-dom-helpers`) provides a set of testing utilities for Ember.js integration and acceptance tests, designed to simulate native DOM events. Originally conceived as an experimental project, it played a crucial role in shaping the official `@ember/test-helpers` API, which is now the recommended solution for most testing needs in Ember CLI applications. The package, currently at version 0.7.0 (though marked as 'Pre 1.0' in the README), introduced helpers like `click`, `fillIn`, `find`, and `tap` that fire native events and are runloop-aware, abstracting away the complexities of browser inconsistencies and Ember's async testing patterns. Its primary differentiator was moving away from jQuery-based event dispatching to native events. However, most of its core functionality has been integrated into `@ember/test-helpers`, making this addon largely superseded. Only `scrollTo` and `selectFiles` remain unique to this package. Its release cadence is minimal, reflecting its historical role rather than active feature development.
npm install ember-native-dom-helpersVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to use `ember-native-dom-helpers` for various interactions (filling input, clicking, key events, triggering events) within an Ember component integration test, asserting DOM changes.
Migrate your tests to use the equivalent helpers from `@ember/test-helpers`. Only `scrollTo` and `selectFiles` remain unique to this addon.
Ensure all test interactions use native DOM event helpers (either from this addon or, preferably, `@ember/test-helpers`) to accurately simulate user interactions and avoid unexpected side effects.
Unless you specifically require the `scrollTo` or `selectFiles` helpers (which are not in `@ember/test-helpers`), you should avoid using this addon for new tests and migrate existing tests to `@ember/test-helpers` for better compatibility and future-proofing.
Consult the addon's README (v0.3.1 release notes mention this) or Testem documentation for specific configurations required to enable touch events in your `testem.js` file for relevant browsers.
Update your assertions to explicitly check for `null` when using `find`, for example: `assert.strictEqual(find('.non-existent-element'), null);`. If you expect multiple results and want an empty array for no matches, use `findAll()` instead.No dependency data recorded yet.