Skip to content

Commit a4628a3

Browse files
josiasdslpluser
andauthored
Fix flaky aria-disabled tests (#621)
* Fix flaky aria-disabled tests * Version bump: 9.2.2 --------- Co-authored-by: Versionator <dev@launchpadlab.com>
1 parent e55fb18 commit a4628a3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@launchpadlab/lp-components",
3-
"version": "9.2.1",
3+
"version": "9.2.2",
44
"engines": {
55
"node": "^18.12"
66
},

test/forms/buttons/button.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ test('Button is aria-disabled when form is invalid', () => {
77
render(<Button invalid={true}>Hi</Button>)
88
const button = screen.getByRole('button')
99

10-
expect(button).toHaveAttribute('aria-disabled')
10+
expect(button).toHaveAttribute('aria-disabled', 'true')
1111
})
1212

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

17-
expect(button).toHaveAttribute('aria-disabled')
17+
expect(button).toHaveAttribute('aria-disabled', 'true')
1818
})
1919

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

0 commit comments

Comments
 (0)