chore: support normalizeWhiteSpace in toHaveAccessibleErrorMessage
This commit is contained in:
parent
5a3862750b
commit
4a207693d0
|
|
@ -212,7 +212,7 @@ export function toHaveAccessibleErrorMessage(
|
|||
options?: { timeout?: number; ignoreCase?: boolean },
|
||||
) {
|
||||
return toMatchText.call(this, 'toHaveAccessibleErrorMessage', locator, 'Locator', async (isNot, timeout) => {
|
||||
const expectedText = serializeExpectedTextValues([expected], { ignoreCase: options?.ignoreCase });
|
||||
const expectedText = serializeExpectedTextValues([expected], { ignoreCase: options?.ignoreCase, normalizeWhiteSpace: true });
|
||||
return await locator._expect('to.have.accessible.error.message', { expectedText: expectedText, isNot, timeout });
|
||||
}, expected, options);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue