Skip to content

Allow passing a list of elements to ignore from getAccessibilityTree #378

@calebeby

Description

@calebeby

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions