Skip to content

Commit

Permalink
Merge pull request #172 from simplabs/greenkeeper/ember-source-3.0.0
Browse files Browse the repository at this point in the history
chore(package): update ember-source to version 3.0.0
  • Loading branch information
Turbo87 authored Mar 21, 2018
2 parents 5868195 + 91fdec7 commit 1e5701a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
24 changes: 11 additions & 13 deletions addon/utils/bind-data-test-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ export default function bindDataTestAttributes(component) {
return;
}

let computedBindings = component.attributeBindings && component.attributeBindings.isDescriptor;
if (computedBindings) {
let message = `ember-test-selectors could not bind data-test-* properties on ${component} ` +
`automatically because attributeBindings is a computed property.`;

warn(message, false, {
id: 'ember-test-selectors.computed-attribute-bindings',
});

return;
}

let attributeBindings = component.getWithDefault('attributeBindings', []);
if (!isArray(attributeBindings)) {
attributeBindings = [attributeBindings];
Expand All @@ -48,5 +36,15 @@ export default function bindDataTestAttributes(component) {

dataTestProperties.forEach(it => attributeBindings.push(it));

component.set('attributeBindings', attributeBindings);
try {
component.set('attributeBindings', attributeBindings);

} catch (error) {
let message = `ember-test-selectors could not bind data-test-* properties on ${component} ` +
`automatically because "attributeBindings" is a read-only property.`;

warn(message, false, {
id: 'ember-test-selectors.computed-attribute-bindings',
});
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"ember-disable-prototype-extensions": "^1.1.2",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.3.0",
"ember-source": "~2.18.0",
"ember-source": "~3.0.0",
"eslint": "^4.2.0",
"eslint-config-simplabs": "^0.4.0",
"eslint-plugin-ember": "^3.6.2",
Expand Down
7 changes: 3 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2252,9 +2252,9 @@ ember-router-generator@^1.0.0, ember-router-generator@^1.2.3:
dependencies:
recast "^0.11.3"

ember-source@~2.18.0:
version "2.18.2"
resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-2.18.2.tgz#75d00eef5488bfe504044b025c752ba924eaf87f"
ember-source@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-3.0.0.tgz#51811cae98d2ceec53bcfbaa876d02b2b5b2159f"
dependencies:
broccoli-funnel "^2.0.1"
broccoli-merge-trees "^2.0.0"
Expand All @@ -2263,7 +2263,6 @@ ember-source@~2.18.0:
ember-cli-normalize-entity-name "^1.0.0"
ember-cli-path-utils "^1.0.0"
ember-cli-string-utils "^1.1.0"
ember-cli-test-info "^1.0.0"
ember-cli-valid-component-name "^1.0.0"
ember-cli-version-checker "^2.1.0"
ember-router-generator "^1.2.3"
Expand Down

0 comments on commit 1e5701a

Please sign in to comment.