@@ -468,8 +468,8 @@ describe("e2e tests", () => {
468468 ) ;
469469
470470 // Pull request was created with the corrects params
471- expect ( fakeGitHub . pullRequestHandler ) . toHaveBeenCalledTimes ( 1 ) ;
472- const request = fakeGitHub . pullRequestHandler . mock
471+ expect ( fakeGitHub . createPullRequestHandler ) . toHaveBeenCalledTimes ( 1 ) ;
472+ const request = fakeGitHub . createPullRequestHandler . mock
473473 . calls [ 0 ] [ 0 ] as CompletedRequest ;
474474 expect ( request . path ) . toEqual (
475475 expect . stringMatching ( / b a z e l b u i l d \/ b a z e l - c e n t r a l - r e g i s t r y / )
@@ -491,6 +491,22 @@ describe("e2e tests", () => {
491491 `https://github.com/${ testOrg } /${ repo } /releases/tag/${ tag } `
492492 )
493493 ) ;
494+
495+ // Pull request was updated to enable auto merge
496+ expect ( fakeGitHub . updatePullRequestHandler ) . toHaveBeenCalledTimes ( 1 ) ;
497+ const updateRequest = fakeGitHub . updatePullRequestHandler . mock
498+ . calls [ 0 ] [ 0 ] as CompletedRequest ;
499+ expect ( updateRequest . path ) . toEqual (
500+ expect . stringMatching (
501+ / r e p o s \/ b a z e l b u i l d \/ b a z e l - c e n t r a l - r e g i s t r y \/ p u l l s \/ \d + /
502+ )
503+ ) ;
504+ const updateBody = ( await updateRequest . body . getJson ( ) ) as any ;
505+ expect ( updateBody ) . toEqual (
506+ expect . objectContaining ( {
507+ allow_auto_merge : true ,
508+ } )
509+ ) ;
494510 } ) ;
495511
496512 test ( "happy path with multiple modules" , async ( ) => {
@@ -536,8 +552,8 @@ describe("e2e tests", () => {
536552 expect ( messages . length ) . toEqual ( 0 ) ;
537553
538554 // One pull requests was created with the corrects params
539- expect ( fakeGitHub . pullRequestHandler ) . toHaveBeenCalledTimes ( 1 ) ;
540- let request = fakeGitHub . pullRequestHandler . mock
555+ expect ( fakeGitHub . createPullRequestHandler ) . toHaveBeenCalledTimes ( 1 ) ;
556+ let request = fakeGitHub . createPullRequestHandler . mock
541557 . calls [ 0 ] [ 0 ] as CompletedRequest ;
542558 expect ( request . path ) . toEqual (
543559 expect . stringMatching ( / b a z e l b u i l d \/ b a z e l - c e n t r a l - r e g i s t r y / )
@@ -644,8 +660,8 @@ describe("e2e tests", () => {
644660 expect ( response . status ) . toEqual ( 200 ) ;
645661
646662 // Pull request points to releaser's BCR fork
647- expect ( fakeGitHub . pullRequestHandler ) . toHaveBeenCalled ( ) ;
648- const request = fakeGitHub . pullRequestHandler . mock
663+ expect ( fakeGitHub . createPullRequestHandler ) . toHaveBeenCalled ( ) ;
664+ const request = fakeGitHub . createPullRequestHandler . mock
649665 . calls [ 0 ] [ 0 ] as CompletedRequest ;
650666 const body = ( await request . body . getJson ( ) ) as any ;
651667 expect ( body ) . toEqual (
0 commit comments