diff --git a/packages/react-codemirror/src/e2e_tests/configuration.spec.tsx b/packages/react-codemirror/src/e2e_tests/configuration.spec.tsx index d44926a1..addb2273 100644 --- a/packages/react-codemirror/src/e2e_tests/configuration.spec.tsx +++ b/packages/react-codemirror/src/e2e_tests/configuration.spec.tsx @@ -95,3 +95,25 @@ test('can set/unset onFocus/onBlur', async ({ mount, page }) => { expect(blurFireCount).toBe(1); }).toPass(); }); + +test('aria-label is not set by default', async ({ mount, page }) => { + await mount(); + + const textField = page.getByRole('textbox'); + + await expect(async () => { + expect(await textField.getAttribute('aria-label')).toBeNull(); + }).toPass(); +}); + +test('can set aria-label', async ({ mount, page }) => { + const ariaLabel = 'Cypher Editor'; + + await mount(); + + const textField = page.getByRole('textbox'); + + await expect(async () => { + expect(await textField.getAttribute('aria-label')).toEqual(ariaLabel); + }).toPass(); +});