-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Description
"@percy/cli": "^1.0.0-beta.55",
The execute() function seems to work when in the "parent" snapshot:
// snapshots.js
module.exports = [
{
name: 'snapshot one',
url: 'http://localhost:8080',
waitForSelector: '.some-element',
execute() {
document.querySelector('h1').innerHTML = 'Tilting on windmills...';
}
}
]However, trying to run the same execute() in an additionalSnapshot (like in this pages.js example) it does not work, and the <h1> content stays the same :/
// snapshots.js
module.exports = [
{
name: 'snapshot one',
url: 'http://localhost:8080',
waitForSelector: '.some-element',
additionalSnapshots: [
{
suffix: '--tilt',
execute() {
document.querySelector('h1').innerHTML = 'Tilting on windmills...';
}
}
]
}
]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels