diff --git a/src/components/Loader/Loader.spec.tsx b/src/components/Loader/Loader.spec.tsx index 7de46f26ce198f6b7cf6b3569b4087081aa3ab86..eb7760bfcebad044a11cd202b8bfb0bd0c241d77 100644 --- a/src/components/Loader/Loader.spec.tsx +++ b/src/components/Loader/Loader.spec.tsx @@ -7,7 +7,7 @@ describe('Loader component', () => { it('should render base Loader', () => { const { container } = render(<Loader />) expect(container).toMatchSnapshot() - expect(screen.getByRole('progressbar')).toBeInTheDocument() + expect(screen.getByRole('progressbar', { busy: true })).toBeInTheDocument() }) it('should render Electricity Loader', () => { diff --git a/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx b/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx index 5a3c5f3dc6117b1546bd6c73ad10765b158f530e..9dbdbb01994e2df94271ff6e5198e069aa3887fb 100644 --- a/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx +++ b/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx @@ -50,7 +50,7 @@ describe('QuizCustomQuestionContent component', () => { expect(screen.getAllByRole('radio').length).toBe(3) }) it('should be rendered correctly with loader', () => { - const { container } = render( + render( <Provider store={store}> <QuizQuestionContentCustom userChallenge={userChallengeData[0]} @@ -60,9 +60,7 @@ describe('QuizCustomQuestionContent component', () => { /> </Provider> ) - expect( - container.getElementsByClassName('question-loading')[0] - ).toBeInTheDocument() + expect(screen.getByRole('progressbar', { busy: true })).toBeInTheDocument() }) it('should display QuizExplanationModal when click on Button', async () => { render(