Skip to content

Commit

Permalink
fix: Remove #ember-testing ID from cloned DOM (#206)
Browse files Browse the repository at this point in the history
* fix: Remove `#ember-testing` ID from cloned DOM

This will be a much better method of removing the styles Ember adds to
distort/shrink the app into the smaller test container.

* v2.1.3
  • Loading branch information
Robdel12 committed May 13, 2020
1 parent 7a40f10 commit 61dae7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions addon-test-support/@percy/ember/index.js
Expand Up @@ -30,23 +30,13 @@ function envInfo() {
}

function clientInfo() {
return `@percy/ember@v2.1.2`;
return `@percy/ember@v2.1.3`;
}

// This will only remove the transform applied by Ember's defaults
// If there are custom styles applied, use Percy CSS to overwrite
function removeEmberTestStyles(dom) {
dom
.querySelector('#ember-testing')
.setAttribute(
'style',
[
'width: initial !important',
'height: initial !important',
'transform: initial !important',
'zoom: initial !important'
].join('; ')
);
dom.querySelector('#ember-testing').removeAttribute('id');
}

function autoGenerateName(name) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@percy/ember",
"version": "2.1.2",
"version": "2.1.3",
"keywords": [
"ember-addon"
],
Expand Down

0 comments on commit 61dae7e

Please sign in to comment.