Lupa API Reference / assert/types / SemanticDomOptions
Interface: SemanticDomOptions
Defined in: src/assert/types.ts:91
Options for Semantic DOM assertions
Properties
ignoreAttributeValueFor?
optionalignoreAttributeValueFor?: (string|AttributeMatcher)[]
Defined in: src/assert/types.ts:105
The attribute MUST exist, but we ignore its value during comparison. Example: ['data-id', 'aria-describedby'] Or target specific tags: [{ tags: ['input'], attributes: ['id'] }]
ignoreChildren?
optionalignoreChildren?:string[]
Defined in: src/assert/types.ts:117
Ignores elements that match the given CSS selectors (removes them from the tree). Example: ['.item', '#dynamic-child']
ignoredAttributes?
optionalignoredAttributes?:"*"| (string|AttributeMatcher)[]
Defined in: src/assert/types.ts:98
Completely ignore specific attributes.
'*': Ignores ALL attributes on all elements.['class', 'id']: Ignores these attributes globally.[{ tags: ['input'], attributes: ['id'] }]: Ignores specific attributes on specific tags.
ignoreTags?
optionalignoreTags?:string[]
Defined in: src/assert/types.ts:111
Ignores specific tags completely from the comparison (removes them from the tree). Example: ['my-custom-element']
ignoreTextContent?
optionalignoreTextContent?:boolean
Defined in: src/assert/types.ts:122
If true, all text nodes (inner text content) are ignored in the comparison.