@@ -89,19 +89,25 @@ jest.mock('@src/course-outline/outline-sidebar/OutlineSidebarContext', () => ({
8989 await userEvent . click ( newBtn ) ;
9090 switch ( containerType ) {
9191 case ContainerType . Section :
92- await waitFor ( ( ) => expect ( handleAddBlock . mutateAsync ) . toHaveBeenCalledWith ( {
93- type : ContainerType . Chapter ,
94- parentLocator : courseUsageKey ,
95- displayName : 'Section' ,
96- } ) ) ;
92+ await waitFor ( ( ) => expect ( handleAddBlock . mutateAsync ) . toHaveBeenCalledWith (
93+ {
94+ type : ContainerType . Chapter ,
95+ parentLocator : courseUsageKey ,
96+ displayName : 'Section' ,
97+ } ,
98+ expect . objectContaining ( { onSuccess : expect . any ( Function ) } ) ,
99+ ) ) ;
97100 break ;
98101 case ContainerType . Subsection :
99- await waitFor ( ( ) => expect ( handleAddBlock . mutateAsync ) . toHaveBeenCalledWith ( {
100- type : ContainerType . Sequential ,
101- parentLocator,
102- displayName : 'Subsection' ,
103- sectionId : parentLocator ,
104- } ) ) ;
102+ await waitFor ( ( ) => expect ( handleAddBlock . mutateAsync ) . toHaveBeenCalledWith (
103+ {
104+ type : ContainerType . Sequential ,
105+ parentLocator,
106+ displayName : 'Subsection' ,
107+ sectionId : parentLocator ,
108+ } ,
109+ expect . objectContaining ( { onSuccess : expect . any ( Function ) } ) ,
110+ ) ) ;
105111 break ;
106112 case ContainerType . Unit :
107113 await waitFor ( ( ) => expect ( handleAddAndOpenUnit . mutateAsync ) . toHaveBeenCalledWith ( {
0 commit comments