Skip to content

Commit 3ea95ac

Browse files
committed
fix: ember-tether & testing issues
- As per [ember-tether documentation](https://github.com/yapplabs/ember-tether) in testing mode we have to make sure that the portal is attached to correct DOM scope > Tether works by appending tethered elements to the <body> tag. Unfortunately, this moves your content outside of the Ember application rootElement during acceptance testing. This breaks event dispatch and action handling, including traditional Ember test helpers like click. This fixes all tests that fail because search popup can't be find.
1 parent 916cd86 commit 3ea95ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/dummy/config/environment.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ module.exports = function (environment) {
3939

4040
ENV.APP.rootElement = '#ember-testing';
4141
ENV.APP.autoboot = false;
42+
43+
ENV['ember-tether'] = {
44+
bodyElementId: 'ember-testing',
45+
};
4246
}
4347

4448
if (environment === 'production') {

0 commit comments

Comments
 (0)