Skip to content

Commit

Permalink
fff
Browse files Browse the repository at this point in the history
  • Loading branch information
mynotdoing committed Nov 11, 2023
1 parent 94742bf commit d4e4ba9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions tests/unit/containers/my-quizzes/EditQuizContainer.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,21 @@ describe('EditQuizContainer', () => {
const autocomplete = screen.getByLabelText(
'myResourcesPage.quizzes.categoryDropdown'
)

fireEvent.click(autocomplete)
fireEvent.change(autocomplete, { target: { value: 'Category 2' } })
fireEvent.keyDown(autocomplete, { key: 'ArrowDown' })
fireEvent.keyDown(autocomplete, { key: 'Enter' })

expect(autocomplete.value).toBe('Category 2')
})

it('should clear autocomplete', () => {
const autocomplete = screen.getByLabelText(
'myResourcesPage.quizzes.categoryDropdown'
)

fireEvent.click(autocomplete)
fireEvent.change(autocomplete, { target: { value: '' } })
fireEvent.keyDown(autocomplete, { key: 'ArrowDown' })
fireEvent.keyDown(autocomplete, { key: 'Enter' })

expect(autocomplete.value).toBe('')
})
it('should change title and description', () => {
Expand All @@ -75,10 +71,8 @@ describe('EditQuizContainer', () => {
const descriptionInput = screen.getByLabelText(
'myResourcesPage.quizzes.defaultNewDescription'
)

fireEvent.change(titleInput, { target: { value: 'New Title' } })
fireEvent.change(descriptionInput, { target: { value: 'New Description' } })

expect(titleInput.value).toBe('New Title')
expect(descriptionInput.value).toBe('New Description')
})
Expand Down

0 comments on commit d4e4ba9

Please sign in to comment.