Skip to content
Snippets Groups Projects
Commit c5ed524a authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

get by role + busy

parent 772b9003
No related branches found
No related tags found
1 merge request!1135Draft: test(lint): add testing library lint plugin
...@@ -7,7 +7,7 @@ describe('Loader component', () => { ...@@ -7,7 +7,7 @@ describe('Loader component', () => {
it('should render base Loader', () => { it('should render base Loader', () => {
const { container } = render(<Loader />) const { container } = render(<Loader />)
expect(container).toMatchSnapshot() expect(container).toMatchSnapshot()
expect(screen.getByRole('progressbar')).toBeInTheDocument() expect(screen.getByRole('progressbar', { busy: true })).toBeInTheDocument()
}) })
it('should render Electricity Loader', () => { it('should render Electricity Loader', () => {
......
...@@ -50,7 +50,7 @@ describe('QuizCustomQuestionContent component', () => { ...@@ -50,7 +50,7 @@ describe('QuizCustomQuestionContent component', () => {
expect(screen.getAllByRole('radio').length).toBe(3) expect(screen.getAllByRole('radio').length).toBe(3)
}) })
it('should be rendered correctly with loader', () => { it('should be rendered correctly with loader', () => {
const { container } = render( render(
<Provider store={store}> <Provider store={store}>
<QuizQuestionContentCustom <QuizQuestionContentCustom
userChallenge={userChallengeData[0]} userChallenge={userChallengeData[0]}
...@@ -60,9 +60,7 @@ describe('QuizCustomQuestionContent component', () => { ...@@ -60,9 +60,7 @@ describe('QuizCustomQuestionContent component', () => {
/> />
</Provider> </Provider>
) )
expect( expect(screen.getByRole('progressbar', { busy: true })).toBeInTheDocument()
container.getElementsByClassName('question-loading')[0]
).toBeInTheDocument()
}) })
it('should display QuizExplanationModal when click on Button', async () => { it('should display QuizExplanationModal when click on Button', async () => {
render( render(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment