diff --git a/addon/-private/data-view/elements/occluded-content.js b/addon/-private/data-view/elements/occluded-content.js index 66a71ddf..c77c1062 100644 --- a/addon/-private/data-view/elements/occluded-content.js +++ b/addon/-private/data-view/elements/occluded-content.js @@ -1,6 +1,5 @@ import { set } from '@ember/object'; import { DEBUG } from '@glimmer/env'; -import { IS_GLIMMER_2, gte as emberVersionGTE } from 'ember-compatibility-helpers'; import document from '../../utils/document-shim'; @@ -27,12 +26,6 @@ export default class OccludedContent { this.isOccludedContent = true; this.rendered = false; - if (!emberVersionGTE('3.0.0')) { - // In older versions of Ember, binding anything on an object in the template - // adds observers which creates __ember_meta__ - this.__ember_meta__ = null; // eslint-disable-line camelcase - } - if (DEBUG) { Object.preventExtensions(this); } @@ -57,11 +50,11 @@ export default class OccludedContent { } get realUpperBound() { - return IS_GLIMMER_2 ? this.upperBound : this.upperBound.previousSibling; + return this.upperBound; } get realLowerBound() { - return IS_GLIMMER_2 ? this.lowerBound : this.lowerBound.nextSibling; + return this.lowerBound; } get parentNode() { diff --git a/addon/-private/data-view/elements/virtual-component.js b/addon/-private/data-view/elements/virtual-component.js index b0d5f5cf..878ba3d9 100644 --- a/addon/-private/data-view/elements/virtual-component.js +++ b/addon/-private/data-view/elements/virtual-component.js @@ -1,7 +1,6 @@ import { set } from '@ember/object'; import { assert } from '@ember/debug'; import { DEBUG } from '@glimmer/env'; -import { IS_GLIMMER_2, gte as emberVersionGTE } from 'ember-compatibility-helpers'; import document from '../../utils/document-shim'; @@ -22,23 +21,17 @@ export default class VirtualComponent { this.rendered = false; - if (!emberVersionGTE('3.0.0')) { - // In older versions of Ember, binding anything on an object in the template - // adds observers which creates __ember_meta__ - this.__ember_meta__ = null; // eslint-disable-line camelcase - } - if (DEBUG) { Object.preventExtensions(this); } } get realUpperBound() { - return IS_GLIMMER_2 ? this.upperBound : this.upperBound.previousSibling; + return this.upperBound; } get realLowerBound() { - return IS_GLIMMER_2 ? this.lowerBound : this.lowerBound.nextSibling; + return this.lowerBound; } getBoundingClientRect() { diff --git a/package.json b/package.json index c349aabc..d9efe03a 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "ember-cli-babel": "^7.12.0", "ember-cli-htmlbars": "^6.0.0", "ember-cli-version-checker": "^5.1.2", - "ember-compatibility-helpers": "^1.2.1", "ember-raf-scheduler": "^0.3.0" }, "devDependencies": { diff --git a/tests/integration/basic-test.js b/tests/integration/basic-test.js index b2ce4dda..8ae775d0 100644 --- a/tests/integration/basic-test.js +++ b/tests/integration/basic-test.js @@ -21,34 +21,12 @@ import { standardTemplate } from 'dummy/tests/helpers/test-scenarios'; -import { scheduler } from 'ember-raf-scheduler'; -import { gte as emberVersionGTE } from 'ember-compatibility-helpers'; - -// Assert an odd timing: After initial render but before settledness. Because -// of changes to the `render` helper in test-helpers, this should be done -// differently in ember-test-helpers 1.x and 2.x. -// -// Use ember-compatibility-helpers < 3 as a proxy for identifying -// ember-test-helpers 1.x. -// -// This helpers can be killed off when Ember 2.18 support is dropped. The -// gte Ember 3 version can be inlined where the helper is used. +// Assert an odd timing: After initial render but before settledness. // async function assertAfterInitialRender(renderFn, assertFn) { - if (emberVersionGTE('3.0.0')) { - renderFn(); - await new Promise(resolve => requestAnimationFrame(resolve)); - assertFn(); - } else { - // After ember-raf-schedulers queues have flushed. - // The schedule of sync inside measure starts a second flush. - scheduler.schedule('measure', () => { - scheduler.schedule('sync', () => { - assertFn(); - }); - }); - renderFn(); - } + renderFn(); + await new Promise(resolve => requestAnimationFrame(resolve)); + assertFn(); } module('vertical-collection', 'Integration | Basic Tests', function(hooks) {