Skip to content

Commit

Permalink
fix tests link click on disabled button
Browse files Browse the repository at this point in the history
  • Loading branch information
D4ve-R committed Nov 22, 2024
1 parent b9ab27b commit deab11f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/links.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,17 +793,13 @@ test.describe('disabled attribute', () => {
const link = await page.getByRole('button', { name: 'Disabled Button', exact: true })
await expect(link).toBeDisabled()
await expect(link).toHaveAttribute('disabled')
await link.click()
await expect(page).toHaveURL('/links/disabled')
})

test('disables the link (as=button) when the disabled attribute is set', async ({ page }) => {
await page.goto('/links/disabled')
const link = await page.getByRole('button', { name: 'Disabled Default Button', exact: true })
await expect(link).toBeDisabled()
await expect(link).toHaveAttribute('disabled')
await link.click()
await expect(page).toHaveURL('/links/disabled')
})

test('does not disable the link (as=button) when the disabled attribute is set to false', async ({ page }) => {
Expand Down

0 comments on commit deab11f

Please sign in to comment.