Skip to content

Commit

Permalink
Fix flaky aria-disabled tests (#621)
Browse files Browse the repository at this point in the history
* Fix flaky aria-disabled tests

* Version bump: 9.2.2

---------

Co-authored-by: Versionator <[email protected]>
  • Loading branch information
josiasds and lpluser authored Nov 9, 2023
1 parent e55fb18 commit a4628a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchpadlab/lp-components",
"version": "9.2.1",
"version": "9.2.2",
"engines": {
"node": "^18.12"
},
Expand Down
4 changes: 2 additions & 2 deletions test/forms/buttons/button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ test('Button is aria-disabled when form is invalid', () => {
render(<Button invalid={true}>Hi</Button>)
const button = screen.getByRole('button')

expect(button).toHaveAttribute('aria-disabled')
expect(button).toHaveAttribute('aria-disabled', 'true')
})

test('Button is aria-disabled when form is pristine', () => {
render(<Button pristine={true}>Hi</Button>)
const button = screen.getByRole('button')

expect(button).toHaveAttribute('aria-disabled')
expect(button).toHaveAttribute('aria-disabled', 'true')
})

test('Button onClick is run when the form is not submitting, pristine, or invalid', async () => {
Expand Down

0 comments on commit a4628a3

Please sign in to comment.