Skip to content

Commit

Permalink
fix: checkbox default value test
Browse files Browse the repository at this point in the history
  • Loading branch information
awesthouse committed Dec 13, 2024
1 parent ea6afd2 commit 4afa9a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ describe('BooleanField', () => {
const inputNode: Element | null =
container.querySelector(` input[id="foo"]`)
expect(inputNode).toBeDefined()
const value = inputNode !== null ? inputNode.getAttribute('value') : ''
const value = inputNode !== null ? inputNode.getAttribute('checked') : ''
expect(value).toBe('true')

})
Expand Down Expand Up @@ -170,7 +170,7 @@ describe('BooleanField', () => {
const inputNode: Element | null =
container.querySelector(` input[id="foo"]`)
expect(inputNode).toBeDefined()
const value = inputNode !== null ? inputNode.getAttribute('value') : ''
const value = inputNode !== null ? inputNode.getAttribute('checked') : ''
expect(value).toBe('true')
userEvent.click(screen.getByTestId('form-checkbox'))
fireEvent.click(screen.getByTestId('form-submit'))
Expand Down

0 comments on commit 4afa9a2

Please sign in to comment.