mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-31 22:22:14 +02:00
update test
This commit is contained in:
parent
0141bbde0e
commit
23d39c79b2
pkg/integration
test/integration_new/interactive_rebase/amend_merge/expected/repo
.git_keep
initial-filepost-merge-file@ -76,6 +76,12 @@ func (self *Input) Confirm() {
|
||||
self.pressKey(self.keys.Universal.Confirm)
|
||||
}
|
||||
|
||||
func (self *Input) ProceedWhenAsked(matcher *matcher) {
|
||||
self.assert.InConfirm()
|
||||
self.assert.MatchCurrentViewContent(matcher)
|
||||
self.Confirm()
|
||||
}
|
||||
|
||||
// i.e. same as Confirm
|
||||
func (self *Input) Enter() {
|
||||
self.pressKey(self.keys.Universal.Confirm)
|
||||
|
@ -5,6 +5,11 @@ import (
|
||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||
)
|
||||
|
||||
var (
|
||||
postMergeFileContent = "post merge file content"
|
||||
postMergeFilename = "post-merge-file"
|
||||
)
|
||||
|
||||
var AmendMerge = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Amends a staged file to a merge commit.",
|
||||
ExtraCmdArgs: "",
|
||||
@ -13,14 +18,14 @@ var AmendMerge = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.
|
||||
NewBranch("development-branch").
|
||||
CreateFileAndAdd("initial-file", "content").
|
||||
CreateFileAndAdd("initial-file", "initial file content").
|
||||
Commit("initial commit").
|
||||
NewBranch("feature-branch"). // it's also checked out automatically
|
||||
CreateFileAndAdd("new-feature-file", "new content").
|
||||
Commit("new feature commit").
|
||||
CheckoutBranch("development-branch").
|
||||
Checkout("development-branch").
|
||||
Merge("feature-branch").
|
||||
CreateFileAndAdd("post-merge-file", "content")
|
||||
CreateFileAndAdd(postMergeFilename, postMergeFileContent)
|
||||
},
|
||||
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
|
||||
assert.CommitCount(3)
|
||||
@ -28,10 +33,18 @@ var AmendMerge = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
input.SwitchToCommitsWindow()
|
||||
assert.CurrentViewName("commits")
|
||||
|
||||
input.PressKeys(keys.Commits.AmendToCommit)
|
||||
input.PressKeys(keys.Universal.Return)
|
||||
mergeCommitMessage := "Merge branch 'feature-branch' into development-branch"
|
||||
assert.MatchHeadCommitMessage(Contains(mergeCommitMessage))
|
||||
|
||||
assert.MatchHeadCommitMessage(Contains("Merge"))
|
||||
input.PressKeys(keys.Commits.AmendToCommit)
|
||||
input.ProceedWhenAsked(Contains("Are you sure you want to amend this commit with your staged files?"))
|
||||
|
||||
// assuring we haven't added a brand new commit
|
||||
assert.CommitCount(3)
|
||||
assert.MatchHeadCommitMessage(Contains(mergeCommitMessage))
|
||||
|
||||
// assuring the post-merge file shows up in the merge commit.
|
||||
assert.MatchMainViewContent(Contains(postMergeFilename))
|
||||
assert.MatchMainViewContent(Contains("++" + postMergeFileContent))
|
||||
},
|
||||
})
|
||||
|
@ -1 +1 @@
|
||||
new feature commit
|
||||
fixup! Merge branch 'feature-branch' into development-branch
|
||||
|
@ -1 +1 @@
|
||||
a69464e3729a09e3a526d4a2db209ee43e64ba1c
|
||||
7802c86c6ce62289e32aa13d0c85dc3f733195cb
|
||||
|
@ -3,6 +3,8 @@
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
||||
[user]
|
||||
email = CI@example.com
|
||||
name = CI
|
||||
|
Binary file not shown.
@ -4,3 +4,4 @@
|
||||
# exclude patterns (uncomment them if you want to use them):
|
||||
# *.[oa]
|
||||
# *~
|
||||
.DS_Store
|
||||
|
@ -1,5 +1,12 @@
|
||||
0000000000000000000000000000000000000000 a69464e3729a09e3a526d4a2db209ee43e64ba1c CI <CI@example.com> 1662823399 +0200 commit (initial): initial commit
|
||||
a69464e3729a09e3a526d4a2db209ee43e64ba1c a69464e3729a09e3a526d4a2db209ee43e64ba1c CI <CI@example.com> 1662823399 +0200 checkout: moving from development-branch to feature-branch
|
||||
a69464e3729a09e3a526d4a2db209ee43e64ba1c 5e62a9dc2e1352e7ee6ecf17033e2ed3382efc6f CI <CI@example.com> 1662823399 +0200 commit: new feature commit
|
||||
5e62a9dc2e1352e7ee6ecf17033e2ed3382efc6f a69464e3729a09e3a526d4a2db209ee43e64ba1c CI <CI@example.com> 1662823399 +0200 checkout: moving from feature-branch to development-branch
|
||||
a69464e3729a09e3a526d4a2db209ee43e64ba1c 77e1bb1effc5857c4d701219a001823432e3586d CI <CI@example.com> 1662823399 +0200 merge feature-branch: Merge made by the 'ort' strategy.
|
||||
0000000000000000000000000000000000000000 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700 commit (initial): initial commit
|
||||
3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700 checkout: moving from development-branch to feature-branch
|
||||
3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 d1c7801838f293fe8f4b49dae6b4919d0359e6e6 CI <CI@example.com> 1663440492 -0700 commit: new feature commit
|
||||
d1c7801838f293fe8f4b49dae6b4919d0359e6e6 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700 checkout: moving from feature-branch to development-branch
|
||||
3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 CI <CI@example.com> 1663440492 -0700 merge feature-branch: Merge made by the 'recursive' strategy.
|
||||
f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 7802c86c6ce62289e32aa13d0c85dc3f733195cb CI <CI@example.com> 1663440493 -0700 commit: fixup! Merge branch 'feature-branch' into development-branch
|
||||
7802c86c6ce62289e32aa13d0c85dc3f733195cb 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440494 -0700 rebase (start): checkout f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15^
|
||||
3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 d1c7801838f293fe8f4b49dae6b4919d0359e6e6 CI <CI@example.com> 1663440494 -0700 rebase: fast-forward
|
||||
d1c7801838f293fe8f4b49dae6b4919d0359e6e6 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440494 -0700 rebase (reset): 'onto'
|
||||
3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 CI <CI@example.com> 1663440494 -0700 rebase: fast-forward
|
||||
f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 f517de66e2a158d4a1d85246611cae9ca23a938d CI <CI@example.com> 1663440494 -0700 rebase (fixup): Merge branch 'feature-branch' into development-branch
|
||||
f517de66e2a158d4a1d85246611cae9ca23a938d f517de66e2a158d4a1d85246611cae9ca23a938d CI <CI@example.com> 1663440494 -0700 rebase (finish): returning to refs/heads/development-branch
|
||||
|
@ -1,2 +1,4 @@
|
||||
0000000000000000000000000000000000000000 a69464e3729a09e3a526d4a2db209ee43e64ba1c CI <CI@example.com> 1662823399 +0200 commit (initial): initial commit
|
||||
a69464e3729a09e3a526d4a2db209ee43e64ba1c 77e1bb1effc5857c4d701219a001823432e3586d CI <CI@example.com> 1662823399 +0200 merge feature-branch: Merge made by the 'ort' strategy.
|
||||
0000000000000000000000000000000000000000 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700 commit (initial): initial commit
|
||||
3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 CI <CI@example.com> 1663440492 -0700 merge feature-branch: Merge made by the 'recursive' strategy.
|
||||
f68c5b48c653ca6ab23abd7606fe8fa8cc8d5b15 7802c86c6ce62289e32aa13d0c85dc3f733195cb CI <CI@example.com> 1663440493 -0700 commit: fixup! Merge branch 'feature-branch' into development-branch
|
||||
7802c86c6ce62289e32aa13d0c85dc3f733195cb f517de66e2a158d4a1d85246611cae9ca23a938d CI <CI@example.com> 1663440494 -0700 rebase (finish): refs/heads/development-branch onto 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3
|
||||
|
@ -1,2 +1,2 @@
|
||||
0000000000000000000000000000000000000000 a69464e3729a09e3a526d4a2db209ee43e64ba1c CI <CI@example.com> 1662823399 +0200 branch: Created from HEAD
|
||||
a69464e3729a09e3a526d4a2db209ee43e64ba1c 5e62a9dc2e1352e7ee6ecf17033e2ed3382efc6f CI <CI@example.com> 1662823399 +0200 commit: new feature commit
|
||||
0000000000000000000000000000000000000000 3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 CI <CI@example.com> 1663440492 -0700 branch: Created from HEAD
|
||||
3ad14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3 d1c7801838f293fe8f4b49dae6b4919d0359e6e6 CI <CI@example.com> 1663440492 -0700 commit: new feature commit
|
||||
|
Binary file not shown.
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/34/9e7420fb0fcc3ff740eae5b9dc103a1261558e
Normal file
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/34/9e7420fb0fcc3ff740eae5b9dc103a1261558e
Normal file
Binary file not shown.
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3a/d14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3
Normal file
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3a/d14f8b4ed479f2fd9d8d4f7fe2a9913771b7f3
Normal file
Binary file not shown.
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3f/891fb57220f67735a13cb5a65d27c8ad388030
Normal file
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/3f/891fb57220f67735a13cb5a65d27c8ad388030
Normal file
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
x��K
|
||||
Β@]Ο)z/H§g�Ι€��U�Ρ™ΌAΑ|τψΌ€ΛWTΑKΛ4= Χ§²δYRΚΪο-1lΉR46¶�“µ9ΛθVΫ02�A|#Ρ8Β[-:“q�c"xh¬JΞφςX6κzΊvύ›Φ.i™nT©J+ήΗHgfwΠγTΑ�Ί›ρ¦+ϋϊµξήή?>
|
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/63/e06ef6d5baa80461d12e953ee7e75444180d8f
Normal file
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/63/e06ef6d5baa80461d12e953ee7e75444180d8f
Normal file
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
x��»j1ESïW¨s´3ÚY B0¸r‘�˜]Åï!›|~’ô)Ͻ§9¶Îóµ9Šñ©UÀ±'³"c`VóPx-½`Ô|1�’|¡ÜmZ±4§’‚ðHI}ë@’ƒRžhG†„I{ûóiÊFèy Œ€ÀJ?zf2s$“Òé½]ÖêNg÷v:ñ¥óvëó»ëE(sJîÙ“÷ݾî
ÿÔ»ÔO¸©êbw(Ðv¯xù჻.muÜÖmÞ�î«ÐZ0
|
2
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/78/02c86c6ce62289e32aa13d0c85dc3f733195cb
Normal file
2
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/78/02c86c6ce62289e32aa13d0c85dc3f733195cb
Normal file
@ -0,0 +1,2 @@
|
||||
xŤŽMjĂ0F»Ö)¦«¬R$ë×J «,z�Ńx¦1D–rČńkh�ĺűŢ·xTK™;.~ôĆÖŤÝ %k!˛"ŃiFöyśČh‹fĆűÄjĹĆK ‰|v‰‚·„ó`1O1č śQš|6^áÖoµÁĺ
|
||||
§ËőĚO,ëťż¨–o0!Xç´-uÔZíëŐůÍ»’ůąźđĂí—!7\čaě[ăă?`^z…‰|ŻkŮÓ_BýśîNš
|
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7a/02580e6e6ba96ea8fb9c7ebad7d03d00ec0643
Normal file
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7a/02580e6e6ba96ea8fb9c7ebad7d03d00ec0643
Normal file
Binary file not shown.
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7b/d422e3608d9bcfeef85748c90a5ec114fc2c17
Normal file
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/7b/d422e3608d9bcfeef85748c90a5ec114fc2c17
Normal file
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
x██K
|
||||
б0@]ГЁ$⌠и╓]УИ8`═1╔DХЯ
x╥▐Вxэj-пя╔"`c"▐б
Q╟▌яeФDиIa╣OkWTЧТW;`^Ю>/9sщ7╧q╚═В&▌<%╦jё╣tL╨Э╘╚Р.╫Д
~²ЗЭ.ц
|
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/d1/c7801838f293fe8f4b49dae6b4919d0359e6e6
Normal file
BIN
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/d1/c7801838f293fe8f4b49dae6b4919d0359e6e6
Normal file
Binary file not shown.
2
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f5/17de66e2a158d4a1d85246611cae9ca23a938d
Normal file
2
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f5/17de66e2a158d4a1d85246611cae9ca23a938d
Normal file
@ -0,0 +1,2 @@
|
||||
x…�¹jADïWt¦HfŽÞ9@ƒ"þˆ9ª-�fwFÆŸï˱£¢ª^òÊÚÚm� áet€,Gx6J²’R¬ˆg…„9ÇZ´²I§ç9`ÚRÇ2ȦªYBfTöQŒÔXCeñ“bÔÖ{�½Ø?¾êâƒÒÁ1Ñ
|
||||
‚pæXÜ:Veç7¥Ç¸®�Î:�/ïøNm»ãµ¬í�´s–Yq4tT^©i_w‰�p~âÓú'(÷´”+i<:Ž¿ý@·e¬Tñ…ûºµÝñyL?2#Y|
|
2
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f6/8c5b48c653ca6ab23abd7606fe8fa8cc8d5b15
Normal file
2
test/integration_new/interactive_rebase/amend_merge/expected/repo/.git_keep/objects/f6/8c5b48c653ca6ab23abd7606fe8fa8cc8d5b15
Normal file
@ -0,0 +1,2 @@
|
||||
xŤŹ»jC1DS߯ŘΕ�kiB¸r‘Ź�´»±Á÷��C>?’ô©†™9Íië<ߢ§ŃU!WÁ4&Gµ™ŞŃ)#5vĺ¤Í{´šĎÓVş.b‘}˘Š*�Ů‚ Z6
…ŮÇś}Í˙xń-“óÉGS2¬ČR4íáY\<±&MSyŚëÚá|�—óĺMżĘĽÝőąó+ř”"˘CptŮąi_w‰ˇ˙ħwí
|
||||
µ—Ą]á`ZĆŁëń§ŕ¶ŚD?őľnóîř{Lßr[Y»
|
@ -1 +1 @@
|
||||
77e1bb1effc5857c4d701219a001823432e3586d
|
||||
f517de66e2a158d4a1d85246611cae9ca23a938d
|
||||
|
@ -1 +1 @@
|
||||
5e62a9dc2e1352e7ee6ecf17033e2ed3382efc6f
|
||||
d1c7801838f293fe8f4b49dae6b4919d0359e6e6
|
||||
|
@ -1 +1 @@
|
||||
content
|
||||
initial file content
|
@ -1 +1 @@
|
||||
content
|
||||
post merge file content
|
Loading…
x
Reference in New Issue
Block a user