Skip to content

[Feature]: Add global option to specify strictness of ARIA snapshots #39345

@cpAdm

Description

@cpAdm

🚀 Feature Request

Add configuration option for strictness of toMatchAriaSnapshot

Example

export default defineConfig({
  expect: {
    toMatchAriaSnapshot: {
      children: 'deep-equal', // Or 'contain' (default) or 'equal'
    },
  },'
  ...
}

Motivation

Currently by default only specified children of ARIA snapshots are checked if they are present in order (- /children: contain).

However, in my practice I almost always use equal since e.g. for tables I really want to make sure no extra rows/columns are present. It would be nice to configure this strictness globally in the playwright config.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions