diff --git a/addon-test-support/@ember/test-helpers/setup-application-context.js b/addon-test-support/@ember/test-helpers/setup-application-context.js index 6ed90484b..a0979d451 100644 --- a/addon-test-support/@ember/test-helpers/setup-application-context.js +++ b/addon-test-support/@ember/test-helpers/setup-application-context.js @@ -19,7 +19,12 @@ export function visit() { return owner.visit(...arguments); }) .then(() => { - context.element = document.querySelector('#ember-testing > .ember-view'); + // eslint-disable-next-line + if (EmberENV.FEATURES['ember-glimmer-remove-application-template-wrapper']) { + context.element = document.querySelector('#ember-testing'); + } else { + context.element = document.querySelector('#ember-testing > .ember-view'); + } }) .then(settled); } diff --git a/addon-test-support/@ember/test-helpers/setup-rendering-context.js b/addon-test-support/@ember/test-helpers/setup-rendering-context.js index 840749eb2..1a323b99d 100644 --- a/addon-test-support/@ember/test-helpers/setup-rendering-context.js +++ b/addon-test-support/@ember/test-helpers/setup-rendering-context.js @@ -196,7 +196,12 @@ export default function setupRenderingContext(context) { // In older Ember versions (2.4) the element itself is not stable, // and therefore we cannot update the `this.element` until after the // rendering is completed - context.element = getRootElement().querySelector('.ember-view'); + // eslint-disable-next-line + if (EmberENV.FEATURES['ember-glimmer-remove-application-template-wrapper']) { + context.element = getRootElement(); + } else { + context.element = getRootElement().querySelector('.ember-view'); + } return context; }); diff --git a/package.json b/package.json index ad5717cec..1bf2c67cd 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "ember-maybe-import-regenerator-for-testing": "^1.0.0", "ember-native-dom-event-dispatcher": "^0.6.3", "ember-resolver": "^4.0.0", - "ember-source": "~2.18.0", + "ember-source": "~3.0.0-beta.2", "ember-source-channel-url": "^1.0.1", "ember-try": "^0.2.23", "eslint-config-prettier": "^2.6.0", diff --git a/tests/dummy/config/environment.js b/tests/dummy/config/environment.js index b344ab177..955d97435 100644 --- a/tests/dummy/config/environment.js +++ b/tests/dummy/config/environment.js @@ -11,6 +11,7 @@ module.exports = function(environment) { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true + 'ember-glimmer-remove-application-template-wrapper': true, }, EXTEND_PROTOTYPES: { // Prevent Ember Data from overriding Date.parse. diff --git a/yarn.lock b/yarn.lock index 3bdb85dd7..53957efac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2788,9 +2788,9 @@ ember-source-channel-url@^1.0.1: dependencies: got "^8.0.1" -ember-source@~2.18.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-2.18.0.tgz#f61cf2701d8aa94a6adee6d47b1d5a73a4cef5f6" +ember-source@~3.0.0-beta.2: + version "3.0.0-beta.3" + resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-3.0.0-beta.3.tgz#1f6dde5caaaceb49b09b5fafb5b0627692e2d56c" dependencies: broccoli-funnel "^2.0.1" broccoli-merge-trees "^2.0.0"