@@ -188,6 +188,8 @@ describe('GitPanel', () => {
188188 it ( 'should commit when commit message is provided' , async ( ) => {
189189 configSpy . mockResolvedValue ( { options : commitUser } ) ;
190190
191+ props . model . checkNotebooksForOutputs = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
192+
191193 await userEvent . type ( screen . getAllByRole ( 'textbox' ) [ 0 ] , commitSummary ) ;
192194 await userEvent . type (
193195 screen . getAllByRole ( 'textbox' ) [ 1 ] ,
@@ -223,6 +225,7 @@ describe('GitPanel', () => {
223225
224226 it ( 'should prompt for user identity if explicitly configured' , async ( ) => {
225227 configSpy . mockResolvedValue ( { options : commitUser } ) ;
228+ props . model . checkNotebooksForOutputs = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
226229
227230 props . settings = MockSettings ( false , true ) as any ;
228231 renderResult . rerender ( < GitPanel { ...props } /> ) ;
@@ -245,6 +248,7 @@ describe('GitPanel', () => {
245248 it ( 'should prompt for user identity if user.name is not set' , async ( ) => {
246249 configSpy . mockImplementation ( mockConfigImplementation ( 'user.email' ) ) ;
247250 mockUtils . showDialog . mockResolvedValue ( dialogValue ) ;
251+ props . model . checkNotebooksForOutputs = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
248252
249253 await userEvent . type ( screen . getAllByRole ( 'textbox' ) [ 0 ] , commitSummary ) ;
250254 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Commit' } ) ) ;
@@ -261,6 +265,7 @@ describe('GitPanel', () => {
261265 it ( 'should prompt for user identity if user.email is not set' , async ( ) => {
262266 configSpy . mockImplementation ( mockConfigImplementation ( 'user.name' ) ) ;
263267 mockUtils . showDialog . mockResolvedValue ( dialogValue ) ;
268+ props . model . checkNotebooksForOutputs = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
264269
265270 await userEvent . type ( screen . getAllByRole ( 'textbox' ) [ 0 ] , commitSummary ) ;
266271 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Commit' } ) ) ;
@@ -280,6 +285,7 @@ describe('GitPanel', () => {
280285
281286 configSpy . mockImplementation ( mockConfigImplementation ( 'user.email' ) ) ;
282287 mockUtils . showDialog . mockResolvedValue ( dialogValue ) ;
288+ props . model . checkNotebooksForOutputs = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
283289
284290 await userEvent . type ( screen . getAllByRole ( 'textbox' ) [ 0 ] , commitSummary ) ;
285291 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Commit' } ) ) ;
@@ -298,6 +304,7 @@ describe('GitPanel', () => {
298304 renderResult . rerender ( < GitPanel { ...props } /> ) ;
299305 configSpy . mockImplementation ( mockConfigImplementation ( 'user.name' ) ) ;
300306 mockUtils . showDialog . mockResolvedValue ( dialogValue ) ;
307+ props . model . checkNotebooksForOutputs = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
301308
302309 await userEvent . type ( screen . getAllByRole ( 'textbox' ) [ 0 ] , commitSummary ) ;
303310 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Commit' } ) ) ;
0 commit comments