@@ -39,23 +39,23 @@ describe("generateToolbar", () => {
3939 } ) ;
4040
4141 describe ( "appendFieldToolbar" , ( ) => {
42- it ( "should render FieldToolbarComponent if not already present" , ( ) => {
43- appendFieldToolbar ( eventDetails , focusedToolbarElement , hideOverlay ) ;
42+ it ( "should render FieldToolbarComponent if not already present" , async ( ) => {
43+ await appendFieldToolbar ( eventDetails , focusedToolbarElement , hideOverlay ) ;
4444
4545 expect ( render ) . toBeCalled ( ) ;
4646 } ) ;
4747
48- it ( "should not render FieldToolbarComponent if already present" , ( ) => {
48+ it ( "should not render FieldToolbarComponent if already present" , async ( ) => {
4949 focusedToolbarElement . innerHTML =
5050 '<div class="visual-builder__focused-toolbar__multiple-field-toolbar"></div>' ;
5151
52- appendFieldToolbar ( eventDetails , focusedToolbarElement , hideOverlay ) ;
52+ await appendFieldToolbar ( eventDetails , focusedToolbarElement , hideOverlay ) ;
5353
5454 expect ( render ) . not . toHaveBeenCalled ( ) ;
5555 } ) ;
5656
57- it ( "should append the rendered component to the focusedToolbarElement" , ( ) => {
58- appendFieldToolbar ( eventDetails , focusedToolbarElement , hideOverlay ) ;
57+ it ( "should append the rendered component to the focusedToolbarElement" , async ( ) => {
58+ await appendFieldToolbar ( eventDetails , focusedToolbarElement , hideOverlay ) ;
5959
6060 expect ( spyAppend ) . toHaveBeenCalledWith ( expect . any ( DocumentFragment ) ) ;
6161 } ) ;
0 commit comments