@@ -5,7 +5,7 @@ import React from 'react';
5
5
import { Factory } from 'rosie' ;
6
6
import { camelCaseObject } from '@edx/frontend-platform' ;
7
7
import {
8
- render , screen , cleanup , initializeMockApp ,
8
+ render , screen , cleanup , initializeMockApp , act ,
9
9
} from '../../../setupTest' ;
10
10
import BulkEmailTool from '../BulkEmailTool' ;
11
11
import { CourseMetadataContext } from '../../page-container/PageContainer' ;
@@ -67,14 +67,16 @@ describe('BulkEmailTool', () => {
67
67
const cohorts = { cohorts : [ ] } ;
68
68
const courseInfo = Factory . build ( 'courseMetadata' ) ;
69
69
const courseMetadata = buildCourseMetadata ( cohorts , courseInfo ) ;
70
- renderBulkEmailTool ( courseMetadata ) ;
71
- // verify all tab data expected is displayed within our component
72
- expect ( await screen . findByText ( 'Course' ) ) . toBeTruthy ( ) ;
73
- expect ( await screen . findByText ( 'Discussion' ) ) . toBeTruthy ( ) ;
74
- expect ( await screen . findByText ( 'Wiki' ) ) . toBeTruthy ( ) ;
75
- expect ( await screen . findByText ( 'Progress' ) ) . toBeTruthy ( ) ;
76
- expect ( await screen . findByText ( 'Instructor' ) ) . toBeTruthy ( ) ;
77
- expect ( await screen . findByText ( 'Dates' ) ) . toBeTruthy ( ) ;
70
+ await act ( async ( ) => {
71
+ renderBulkEmailTool ( courseMetadata ) ;
72
+ // verify all tab data expected is displayed within our component
73
+ expect ( screen . findByText ( 'Course' ) ) . toBeTruthy ( ) ;
74
+ expect ( screen . findByText ( 'Discussion' ) ) . toBeTruthy ( ) ;
75
+ expect ( screen . findByText ( 'Wiki' ) ) . toBeTruthy ( ) ;
76
+ expect ( screen . findByText ( 'Progress' ) ) . toBeTruthy ( ) ;
77
+ expect ( screen . findByText ( 'Instructor' ) ) . toBeTruthy ( ) ;
78
+ expect ( screen . findByText ( 'Dates' ) ) . toBeTruthy ( ) ;
79
+ } ) ;
78
80
} ) ;
79
81
80
82
test ( 'BulkEmailTool renders error page on no staff user' , async ( ) => {
0 commit comments