pleasantest icon indicating copy to clipboard operation
pleasantest copied to clipboard

Allow passing a list of elements to ignore from getAccessibilityTree

Open calebeby opened this issue 3 years ago • 0 comments

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

calebeby avatar Jan 26 '22 19:01 calebeby