Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaAfonina committed Nov 18, 2023
1 parent 77169d0 commit e89cf91
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,28 @@ describe('CreateOrEditQuizContainer', () => {
expect(setTitle).toHaveBeenCalled()
expect(setDescription).toHaveBeenCalled()
})

it('should render create new question form', () => {
const btnAddQuestion = screen.getByText(
'myResourcesPage.quizzes.createNewQuestion'
)

fireEvent.click(btnAddQuestion)

const formTitle = screen.getByText(/title:/i)

expect(formTitle).toBeInTheDocument()
})

it('should render add questions form', () => {
const btnAddNewQuestion = screen.getByText(
'myResourcesPage.quizzes.addQuestion'
)

fireEvent.click(btnAddNewQuestion)

const formTitle = screen.getByText('myResourcesPage.questions.add')

expect(formTitle).toBeInTheDocument()
})
})

0 comments on commit e89cf91

Please sign in to comment.