pleasantest
pleasantest copied to clipboard
Allow passing a list of elements to ignore from getAccessibilityTree
Sometimes some elements cause a lot of clutter and don't help the test. We could allow passing an array of elements or a function to exclude them:
await getAccessibilityTree(
el,
{
ignore: [someEl, otherEl],
// or: ignore: (el) => el.classList.includes('something')
}
)
In the snapshot output, we could either exclude them entirely or we could show <ignored> in their place