Releases: percy/percy-ember
Releases · percy/percy-ember
v2.1.0
What's new?
You can now pass your own domTransformation
option to percySnapshot
. This will allow you to add elements to the clone of the DOM that Percy captures (#188). For example:
test('passing a custom DOM transform', async function(assert) {
await visit('/');
assert.equal(currentURL(), '/');
await percySnapshot(assert, {
domTransformation: function(clonedDom) {
let $scopedRoot = clonedDom.querySelector('#ember-testing');
let $h1 = document.createElement('h1');
$h1.innerText = 'Hello modified DOM!';
$scopedRoot.appendChild($h1);
return clonedDom;
}
});
This could be useful if you have an Ember addon which adds DOM elements outside of the Ember application root (which is ember-testing
in tests). You could then collect those elements and add them back into the DOM clone Percy captures.
v2.0.0-beta.3
What is this?
This release awaits for the POST
to percy-agent to resolve before releasing the test suite to move forward. (#172)
v2.0.0-beta.2
What changed?
- Removed
ember-cli-htmlbars
from dependencies (#164)
v2.0.0-beta.1
What changed?
v2.0.0 of the Percy Ember SDK is a complete rewrite to bring it inline with how all other Percy SDKs function now (by utilizing @percy/agent
for the heavy lifting)
Breaking changes:
- Import API changes:
percySnapshot
is now the packages default export (import { percySnapshot } 'ember-percy'
becomesimport percySnapshot from '@percy/ember';
). - Related to the above, the package name is changing to
@percy/ember
. - You need to prepend the
ember test
command withpercy exec --
now (percy exec -- ember test
) - You must use
await
withpercySnapshot
(or ensure the promise resolves, to make sure your snapshots are as stable as possible) breakpointsConfig
is no longer going to work -- we're not hooking into the Ember build pipeline to gather config objects. Use a Percy config file instead.PERCY_PARALLEL_TOTAL
might need to be adjusted if you're using Ember Exam. Now most exam builds will only create one Percy build (since we wrap the test command withpercy exec
now)