diff --git a/addon/components/ember-tbody/component.js b/addon/components/ember-tbody/component.js index 32c3150ca..8088a66eb 100644 --- a/addon/components/ember-tbody/component.js +++ b/addon/components/ember-tbody/component.js @@ -5,8 +5,6 @@ import { computed } from '@ember/object'; import { observer } from '../../-private/utils/observer'; import { bool, readOnly, or } from '@ember/object/computed'; -import { SUPPORTS_INVERSE_BLOCK } from 'ember-compatibility-helpers'; - import CollapseTree, { SELECT_MODE } from '../../-private/collapse-tree'; import defaultTo from '../../-private/utils/default-to'; @@ -364,10 +362,4 @@ export default Component.extend({ _containerSelector: computed('containerSelector', 'unwrappedApi.tableId', function() { return this.get('containerSelector') || `#${this.get('unwrappedApi.tableId')}`; }), - - /** - * Determines if the component can yield-to-inverse based on - * the version compatability. - */ - shouldYieldToInverse: SUPPORTS_INVERSE_BLOCK, }); diff --git a/addon/components/ember-tbody/template.hbs b/addon/components/ember-tbody/template.hbs index b09ed9c67..50bac979f 100644 --- a/addon/components/ember-tbody/template.hbs +++ b/addon/components/ember-tbody/template.hbs @@ -46,6 +46,6 @@ {{/if}} {{/-ember-table-private/row-wrapper}} -{{else if this.shouldYieldToInverse}} +{{else}} {{yield to='inverse'}} {{/vertical-collection}} diff --git a/tests/dummy/app/pods/application/controller.js b/tests/dummy/app/pods/application/controller.js deleted file mode 100644 index 2f00de9b2..000000000 --- a/tests/dummy/app/pods/application/controller.js +++ /dev/null @@ -1,9 +0,0 @@ -import Controller from '@ember/controller'; -import { gte } from 'ember-compatibility-helpers'; -import { computed } from '@ember/object'; - -export default Controller.extend({ - canShowAddonDocs: computed(function() { - return gte('2.8.0'); - }), -}); diff --git a/tests/dummy/app/pods/application/template.hbs b/tests/dummy/app/pods/application/template.hbs index 9940f89b8..2f279b2cd 100644 --- a/tests/dummy/app/pods/application/template.hbs +++ b/tests/dummy/app/pods/application/template.hbs @@ -1,11 +1,7 @@
- {{#if this.canShowAddonDocs}} - {{docs-header}} - {{/if}} + {{docs-header}} {{outlet}} - {{#if this.canShowAddonDocs}} - {{docs-keyboard-shortcuts}} - {{/if}} + {{docs-keyboard-shortcuts}}
diff --git a/tests/integration/components/basic-test.js b/tests/integration/components/basic-test.js index 82e7c702c..0d1c9f570 100644 --- a/tests/integration/components/basic-test.js +++ b/tests/integration/components/basic-test.js @@ -7,8 +7,6 @@ import { componentModule } from '../../helpers/module'; import { find, findAll, scrollTo } from 'ember-native-dom-helpers'; -import { SUPPORTS_INVERSE_BLOCK } from 'ember-compatibility-helpers'; - import TablePage from 'ember-table/test-support/pages/ember-table'; import { collection, hasClass } from 'ember-classy-page-object'; import wait from 'ember-test-helpers/wait'; @@ -213,30 +211,26 @@ module('Integration | basic', function() { }); test('it yields to inverse when tbody rows are empty', async function(assert) { - if (!SUPPORTS_INVERSE_BLOCK) { - assert.ok(true, 'Does not support yield-to-inverse'); - } else { - this.set('columns', generateColumns(4)); - this.set('rows', []); - this.render(hbs` -
- {{#ember-table as |t|}} - {{ember-thead api=t columns=columns}} + this.set('columns', generateColumns(4)); + this.set('rows', []); + this.render(hbs` +
+ {{#ember-table as |t|}} + {{ember-thead api=t columns=this.columns}} - {{#ember-tbody api=t rows=rows as |b|}} - {{else}} -
inverse yield
- {{/ember-tbody}} - {{/ember-table}} -
- `); + {{#ember-tbody api=t rows=this.rows as |b|}} + {{else}} +
inverse yield
+ {{/ember-tbody}} + {{/ember-table}} +
+ `); - await wait(); - assert.ok( - find('[data-test-inverse-yield]'), - 'expected the inverse yield content to be displayed' - ); - } + await wait(); + assert.ok( + find('[data-test-inverse-yield]'), + 'expected the inverse yield content to be displayed' + ); }); test('Text can be aligned left, center or right', async function(assert) {