Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaAfonina committed Nov 16, 2023
1 parent b777309 commit 6110126
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ describe('CreateOrEditQuizContainer', () => {
expect(titleInput.value).toBe('quiz title')
expect(descriptionInput.value).toBe('quiz description')
})

it('should click on save button', () => {
const saveBtn = screen.getByText('common.save')

fireEvent.click(saveBtn)

expect(setTitle).toHaveBeenCalled()
expect(setDescription).toHaveBeenCalled()
})
})

0 comments on commit 6110126

Please sign in to comment.