diff --git a/addon/utils/bind-data-test-attributes.js b/addon/utils/bind-data-test-attributes.js index 2ab869cd..6d800e38 100644 --- a/addon/utils/bind-data-test-attributes.js +++ b/addon/utils/bind-data-test-attributes.js @@ -1,6 +1,5 @@ -import Ember from 'ember'; - -const { warn, isArray } = Ember; +import { warn } from '@ember/debug'; +import { isArray } from '@ember/array'; const TEST_SELECTOR_PREFIX = /data-test-.*/; @@ -21,9 +20,11 @@ export default function bindDataTestAttributes(component) { let message = `ember-test-selectors could not bind data-test-* properties on ${component} ` + `automatically because tagName is empty.`; - return warn(message, false, { + warn(message, false, { id: 'ember-test-selectors.empty-tag-name', }); + + return; } let computedBindings = component.attributeBindings && component.attributeBindings.isDescriptor; @@ -31,9 +32,11 @@ export default function bindDataTestAttributes(component) { let message = `ember-test-selectors could not bind data-test-* properties on ${component} ` + `automatically because attributeBindings is a computed property.`; - return warn(message, false, { + warn(message, false, { id: 'ember-test-selectors.computed-attribute-bindings', }); + + return; } let attributeBindings = component.getWithDefault('attributeBindings', []); diff --git a/package.json b/package.json index b1b14ca3..0fb7668b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "dependencies": { "broccoli-stew": "^1.4.0", - "ember-cli-babel": "^6.0.0", + "ember-cli-babel": "^6.6.0", "ember-cli-version-checker": "^2.0.0" }, "devDependencies": { diff --git a/tests/unit/utils/bind-data-test-attributes-test.js b/tests/unit/utils/bind-data-test-attributes-test.js index 6472e4df..a81d1093 100644 --- a/tests/unit/utils/bind-data-test-attributes-test.js +++ b/tests/unit/utils/bind-data-test-attributes-test.js @@ -1,10 +1,8 @@ import { module, test } from 'qunit'; -import Ember from 'ember'; +import EmberObject, { computed } from '@ember/object'; import bindDataTestAttributes from 'ember-test-selectors/utils/bind-data-test-attributes'; -const { Object: EmberObject, computed } = Ember; - module('Unit | Utility | bind data test attributes'); test('it adds missing attributeBindings array', function(assert) {