Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/ui-coverage/configuration/elementfilters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,35 @@ sidebar_label: elementFilters
# elementFilters

<ElementFilters />

### Excluding disabled elements

UI Coverage highlights disabled elements by default to reveal potential untested paths in your app, in case those elements become enabled later. If needed, you can exclude them from the report using the `elementFilters` configuration.

#### Config

```json
{
"elementFilters": [
{
"selector": "[disabled]",
"include": false
}
]
}
```

#### HTML

```xml
<body>
<button data-cy='cancel'>Cancel</button>
<button disabled data-cy='submit'>Submit</button>
</body>
```

#### Elements shown in UI

```
[data-cy='cancel']
```
Loading