From 6ad67d4c7ab02b7fc4ba3bb5525ac04854677244 Mon Sep 17 00:00:00 2001 From: anait-airiian Date: Sun, 17 Nov 2024 18:16:35 +0100 Subject: [PATCH] feat(aria): fix type for the accessible name Changed type accessible name in the doc file References #32593 --- docs/src/api/class-locatorassertions.md | 2 +- tests/page/expect-misc.spec.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/src/api/class-locatorassertions.md b/docs/src/api/class-locatorassertions.md index d67d490a30..3102ef085e 100644 --- a/docs/src/api/class-locatorassertions.md +++ b/docs/src/api/class-locatorassertions.md @@ -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. diff --git a/tests/page/expect-misc.spec.ts b/tests/page/expect-misc.spec.ts index e5d2528b9e..0ab5707a62 100644 --- a/tests/page/expect-misc.spec.ts +++ b/tests/page/expect-misc.spec.ts @@ -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(`