@@ -613,10 +613,12 @@ describe('GitTabController', function() {
613
613
const commitView = wrapper . find ( 'CommitView' ) . instance ( ) ;
614
614
commitView . setState ( { showCoAuthorInput : true } ) ;
615
615
commitView . onSelectedCoAuthorsChanged ( [ author ] ) ;
616
+ await updateWrapper ( repository , wrapper ) ;
616
617
617
618
commandRegistry . dispatch ( workspaceElement , 'github:amend-last-commit' ) ;
618
619
// verify that coAuthor was passed
619
620
await assert . async . deepEqual ( repository . commit . args [ 0 ] [ 1 ] , { amend : true , coAuthors : [ author ] } ) ;
621
+ await repository . commit . returnValues [ 0 ] ;
620
622
await updateWrapper ( repository , wrapper ) ;
621
623
622
624
assert . deepEqual ( getLastCommit ( ) . coAuthors , [ author ] ) ;
@@ -706,15 +708,14 @@ describe('GitTabController', function() {
706
708
const wrapper = mount ( await buildApp ( repository ) ) ;
707
709
708
710
assert . deepEqual ( wrapper . find ( 'CommitView' ) . prop ( 'selectedCoAuthors' ) , [ ] ) ;
711
+ // ensure that the co author trailer is stripped from commit message
712
+ let commitMessages = wrapper . find ( '.github-RecentCommit-message' ) . map ( node => node . text ( ) ) ;
713
+ assert . deepEqual ( commitMessages , [ commitSubject , 'Initial commit' ] ) ;
709
714
710
715
assert . lengthOf ( wrapper . find ( '.github-RecentCommit-undoButton' ) , 1 ) ;
711
716
wrapper . find ( '.github-RecentCommit-undoButton' ) . simulate ( 'click' ) ;
712
717
await updateWrapper ( repository , wrapper ) ;
713
718
714
- let commitMessages = wrapper . find ( '.github-RecentCommit-message' ) . map ( node => node . text ( ) ) ;
715
- // ensure that the co author trailer is stripped from commit message
716
- assert . deepEqual ( commitMessages , [ commitSubject , 'Initial commit' ] ) ;
717
-
718
719
assert . lengthOf ( wrapper . find ( 'GitTabView' ) . prop ( 'stagedChanges' ) , 1 ) ;
719
720
assert . deepEqual ( wrapper . find ( 'GitTabView' ) . prop ( 'stagedChanges' ) , [ {
720
721
filePath : 'new-file.txt' ,
0 commit comments