@@ -15,6 +15,7 @@ vi.mock("../../utils/instanceHandlers", () => ({
1515 handleDeleteInstance : vi . fn ( ) ,
1616} ) ) ;
1717
18+ //CommentIcon testcases are covered seperatly
1819vi . mock ( "../CommentIcon" , ( ) => ( {
1920 default : vi . fn ( ( ) => < div > Comment Icon</ div > )
2021 } ) ) ;
@@ -127,7 +128,7 @@ describe("MultipleFieldToolbarComponent", () => {
127128 expect ( moveLeftButton ) . toBeInTheDocument ( ) ;
128129 expect ( moveRightButton ) . toBeInTheDocument ( ) ;
129130 expect ( deleteButton ) . toBeInTheDocument ( ) ;
130- expect ( screen . queryByText ( 'Comment Icon' ) ) . toBeNull ( ) ;
131+ expect ( screen . queryByText ( 'Comment Icon' ) ) . not . toBeInTheDocument ( ) ; ;
131132 } ) ;
132133
133134 test ( "renders toolbar without move buttons for non multiple" , async ( ) => {
@@ -153,9 +154,9 @@ describe("MultipleFieldToolbarComponent", () => {
153154 ) ;
154155
155156 expect ( screen . queryByText ( 'Comment Icon' ) ) . toBeInTheDocument ( ) ;
156- expect ( moveLeftButton ) . toBeNull ( ) ;
157- expect ( moveRightButton ) . toBeNull ( ) ;
158- expect ( deleteButton ) . toBeNull ( ) ;
157+ expect ( moveLeftButton ) . not . toBeInTheDocument ( ) ; ;
158+ expect ( moveRightButton ) . not . toBeInTheDocument ( ) ; ;
159+ expect ( deleteButton ) . not . toBeInTheDocument ( ) ; ;
159160 } ) ;
160161
161162 test ( "renders all toolbar buttons for multiple and whole multiple field" , async ( ) => {
@@ -187,9 +188,9 @@ describe("MultipleFieldToolbarComponent", () => {
187188 ) ;
188189
189190
190- expect ( deleteButton ) . toBeNull ( ) ;
191- expect ( moveLeftButton ) . toBeNull ( ) ;
192- expect ( moveRightButton ) . toBeNull ( ) ;
191+ expect ( deleteButton ) . not . toBeInTheDocument ( ) ; ;
192+ expect ( moveLeftButton ) . not . toBeInTheDocument ( ) ; ;
193+ expect ( moveRightButton ) . not . toBeInTheDocument ( ) ; ;
193194 expect ( screen . queryByText ( 'Comment Icon' ) ) . toBeInTheDocument ( ) ;
194195 } ) ;
195196
0 commit comments