@@ -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,8 @@ 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 ( [ ] ) ;
252+
248253
249254 await userEvent . type ( screen . getAllByRole ( 'textbox' ) [ 0 ] , commitSummary ) ;
250255 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Commit' } ) ) ;
@@ -261,6 +266,7 @@ describe('GitPanel', () => {
261266 it ( 'should prompt for user identity if user.email is not set' , async ( ) => {
262267 configSpy . mockImplementation ( mockConfigImplementation ( 'user.name' ) ) ;
263268 mockUtils . showDialog . mockResolvedValue ( dialogValue ) ;
269+ props . model . checkNotebooksForOutputs = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
264270
265271 await userEvent . type ( screen . getAllByRole ( 'textbox' ) [ 0 ] , commitSummary ) ;
266272 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Commit' } ) ) ;
@@ -280,6 +286,7 @@ describe('GitPanel', () => {
280286
281287 configSpy . mockImplementation ( mockConfigImplementation ( 'user.email' ) ) ;
282288 mockUtils . showDialog . mockResolvedValue ( dialogValue ) ;
289+ props . model . checkNotebooksForOutputs = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
283290
284291 await userEvent . type ( screen . getAllByRole ( 'textbox' ) [ 0 ] , commitSummary ) ;
285292 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Commit' } ) ) ;
@@ -298,6 +305,7 @@ describe('GitPanel', () => {
298305 renderResult . rerender ( < GitPanel { ...props } /> ) ;
299306 configSpy . mockImplementation ( mockConfigImplementation ( 'user.name' ) ) ;
300307 mockUtils . showDialog . mockResolvedValue ( dialogValue ) ;
308+ props . model . checkNotebooksForOutputs = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
301309
302310 await userEvent . type ( screen . getAllByRole ( 'textbox' ) [ 0 ] , commitSummary ) ;
303311 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Commit' } ) ) ;
0 commit comments