|
1 | | -/* globals EmberENV */ |
2 | 1 | import { module, test } from 'qunit'; |
3 | 2 | import Service from '@ember/service'; |
4 | 3 | import Component, { setComponentTemplate } from '@ember/component'; |
@@ -137,36 +136,18 @@ module('setupRenderingContext', function (hooks) { |
137 | 136 | assert.equal(this.element.textContent, 'hello!'); |
138 | 137 | }); |
139 | 138 |
|
140 | | - if (EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) { |
141 | | - test('render exposes an `.element` property with application template wrapper', async function (assert) { |
142 | | - let rootElement = document.getElementById('ember-testing'); |
143 | | - assert.notEqual( |
144 | | - this.element, |
145 | | - rootElement, |
146 | | - 'this.element should not be rootElement' |
147 | | - ); |
148 | | - assert.ok( |
149 | | - rootElement.contains(this.element), |
150 | | - 'this.element is _within_ the rootElement' |
151 | | - ); |
152 | | - await render(hbs`<p>Hello!</p>`); |
153 | | - |
154 | | - assert.equal(this.element.textContent, 'Hello!'); |
155 | | - }); |
156 | | - } else { |
157 | | - test('render exposes an `.element` property without an application template wrapper', async function (assert) { |
158 | | - let rootElement = document.getElementById('ember-testing'); |
159 | | - assert.equal( |
160 | | - this.element, |
161 | | - rootElement, |
162 | | - 'this.element should _be_ rootElement' |
163 | | - ); |
| 139 | + test('render exposes an `.element` property without an application template wrapper', async function (assert) { |
| 140 | + let rootElement = document.getElementById('ember-testing'); |
| 141 | + assert.equal( |
| 142 | + this.element, |
| 143 | + rootElement, |
| 144 | + 'this.element should _be_ rootElement' |
| 145 | + ); |
164 | 146 |
|
165 | | - await render(hbs`<p>Hello!</p>`); |
| 147 | + await render(hbs`<p>Hello!</p>`); |
166 | 148 |
|
167 | | - assert.equal(this.element.textContent, 'Hello!'); |
168 | | - }); |
169 | | - } |
| 149 | + assert.equal(this.element.textContent, 'Hello!'); |
| 150 | + }); |
170 | 151 |
|
171 | 152 | test('is settled after rendering', async function (assert) { |
172 | 153 | await render(hbs`Hi!`); |
|
0 commit comments