Skip to content

Commit

Permalink
Revert "Fixes rootElement to match that of this.$()[0] (#121)" (#132)
Browse files Browse the repository at this point in the history
This reverts commit 6300642.
  • Loading branch information
cibernox authored Dec 8, 2017
1 parent 3bc6050 commit 58b1dfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion addon-test-support/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
class TestSupportSettings {

constructor(init = { rootElement: '#ember-testing > .ember-view' }) {
constructor(init = { rootElement: '#ember-testing' }) {
this._rootElement = init.rootElement;
}

Expand Down
8 changes: 0 additions & 8 deletions tests/integration/find-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,3 @@ test('find without args returns root element', function(assert) {

assert.strictEqual(find(), document.querySelector(settings.rootElement), 'find() returns rootElement');
});

test('find works with the right rootElement', function(assert) {
this.render(hbs`<div id="first-child"></div>`);

let firstChild = document.querySelector('#first-child');

assert.strictEqual(find(':first-child'), firstChild, ':first-child returns the first element');
});
4 changes: 4 additions & 0 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import {
setResolver
} from 'ember-qunit';
import { start } from 'ember-cli-qunit';
import { settings } from 'ember-native-dom-helpers';
import config from '../config/environment';

setResolver(resolver);
const { APP: { rootElement } } = config;
settings.rootElement = rootElement || settings.rootElement;
start();

0 comments on commit 58b1dfe

Please sign in to comment.