feat(aria): fix type for the accessible name

Changed type accessible name in the doc file

References #32593
This commit is contained in:
anait-airiian 2024-11-17 18:16:35 +01:00
parent bc99d141bb
commit 6ad67d4c7a
2 changed files with 8 additions and 1 deletions

View file

@ -1236,7 +1236,7 @@ await Expect(locator).ToHaveAccessibleNameAsync("Save to disk");
### param: LocatorAssertions.toHaveAccessibleName.name
* since: v1.44
- `name` <[string]|[RegExp]|[Array]<[string]>|[Array]<[RegExp]>>
- `name` <[string]|[RegExp]|[Array]<[string]|[RegExp]>>
Expected accessible name.

View file

@ -464,8 +464,15 @@ test('toHaveAccessibleName should accept array of names for multiple elements',
await expect(page.getByRole('row')).toHaveAccessibleName(['cell a1 cell b1 cell C1',
'cell A2 Cell b2 Cell c2',
'Cell a3 Cell b3 cell C3',], { ignoreCase: true });
await expect(page.getByRole('row')).not.toHaveAccessibleName([
'Cel A4 Cell B4 Cell C4',
'Cell A5 Cell B5 Cell C5',
'Cell A6 Cell B6 Cell C6',
]);
});
test('toHaveAccessibleDescription', async ({ page }) => {
await page.setContent(`
<div role="button" aria-description="Hello"></div>