Skip to content

Commit

Permalink
test: disable spellcheck on inputs to avoid noise
Browse files Browse the repository at this point in the history
spellcheck is async, and the image snapshots may be taken before or after the the error squiggles show
  • Loading branch information
seleb committed Oct 13, 2021
1 parent 3c92b16 commit 3d9ea87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ describe('Borksy', () => {
waitUntil: 'networkidle2',
});

// hide mascot to avoid noise in snapshots
await page.evaluate(() => {
// hide mascot to avoid noise in snapshots
document.querySelector('#mascot').style.visibility = 'hidden';
// disable spellcheck to avoid noise in snapshots (spellcheck is async)
Array.from(document.querySelectorAll('textarea, input')).forEach(i => {
i.spellcheck = false;
});
});
});

Expand Down

0 comments on commit 3d9ea87

Please sign in to comment.