I'm testing an error message.
Here's what I have to do now:
const subjectDescriptionId = await page
.getByRole('textbox', {name: /subject/i})
.getAttribute('aria-describedby')
await expect(page.locator(`id=${subjectDescriptionId}`)).toHaveText(/required/i)
Here's what I'd like to be able to do:
const subjectDescription = await page
.getByRole('textbox', {name: /subject/i})
.getDescription()
await expect(subjectDescription).toHaveText(/required/i)
Thanks!
I'm testing an error message.
Here's what I have to do now:
Here's what I'd like to be able to do:
Thanks!