mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-27 00:51:18 +02:00
commit integrations test with window name's assertion
This commit is contained in:
committed by
Jesse Duffield
parent
87e0f6b92d
commit
bfcbf228bf
@ -6,21 +6,21 @@ import (
|
||||
)
|
||||
|
||||
var Staged = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Staging a couple files, going in the staged files menu and committing",
|
||||
Description: "Staging a couple files, going in the staged files menu, unstaging a line then committing",
|
||||
ExtraCmdArgs: "",
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.CreateFile("myfile", "myfile content")
|
||||
shell.CreateFile("myfile2", "myfile2 content")
|
||||
shell.
|
||||
CreateFile("myfile", "myfile content\nwith a second line").
|
||||
CreateFile("myfile2", "myfile2 content")
|
||||
},
|
||||
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
|
||||
assert.CommitCount(0)
|
||||
|
||||
input.PrimaryAction()
|
||||
input.NextItem()
|
||||
input.PrimaryAction()
|
||||
input.Confirm()
|
||||
input.PrimaryAction()
|
||||
input.PressKeys(keys.Files.CommitChanges)
|
||||
|
||||
commitMessage := "my commit message"
|
||||
@ -29,5 +29,6 @@ var Staged = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
|
||||
assert.CommitCount(1)
|
||||
assert.MatchHeadCommitMessage(Equals(commitMessage))
|
||||
assert.CurrentWindowName("stagingSecondary")
|
||||
},
|
||||
})
|
||||
|
@ -6,20 +6,20 @@ import (
|
||||
)
|
||||
|
||||
var Unstaged = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Staging a couple files, going in the unstaged files menu and committing",
|
||||
Description: "Staging a couple files, going in the unstaged files menu, staging a line and committing",
|
||||
ExtraCmdArgs: "",
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.CreateFile("myfile", "myfile content")
|
||||
shell.CreateFile("myfile2", "myfile2 content")
|
||||
shell.
|
||||
CreateFile("myfile", "myfile content\nwith a second line").
|
||||
CreateFile("myfile2", "myfile2 content")
|
||||
},
|
||||
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
|
||||
assert.CommitCount(0)
|
||||
|
||||
input.PrimaryAction()
|
||||
input.NextItem()
|
||||
input.Confirm()
|
||||
input.PrimaryAction()
|
||||
input.PressKeys(keys.Files.CommitChanges)
|
||||
|
||||
commitMessage := "my commit message"
|
||||
@ -28,5 +28,6 @@ var Unstaged = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
|
||||
assert.CommitCount(1)
|
||||
assert.MatchHeadCommitMessage(Equals(commitMessage))
|
||||
assert.CurrentWindowName("staging")
|
||||
},
|
||||
})
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
0000000000000000000000000000000000000000 ef3197feca3fdc5b9f0170f483c6ff138d5cf186 CI <CI@example.com> 1669566692 +0100 commit (initial): my commit message
|
||||
0000000000000000000000000000000000000000 a0a4dfd8937f66345c93ee7ebf5f85d53e05e9e8 CI <CI@example.com> 1669569482 +0100 commit (initial): my commit message
|
||||
|
@ -1 +1 @@
|
||||
0000000000000000000000000000000000000000 ef3197feca3fdc5b9f0170f483c6ff138d5cf186 CI <CI@example.com> 1669566692 +0100 commit (initial): my commit message
|
||||
0000000000000000000000000000000000000000 a0a4dfd8937f66345c93ee7ebf5f85d53e05e9e8 CI <CI@example.com> 1669569482 +0100 commit (initial): my commit message
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
x��M
|
||||
�0]�o/H~�����%�P�GJAoo��f��D����d��(9�Xk�Y�q(`$glҕct�٨���m�i��4_�fY�8�&2!$�0Z:j����>��SW��_B�m��-�0�
|
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
x��A
|
||||
�0E]��$�i�D��z�1�����F���n���?�G�yWWU Q��c�X)�._�,�N��%�Ct�����0�i/�[�z������m�>x�m'U�ԝ}������M��0
|
@ -1 +1 @@
|
||||
ef3197feca3fdc5b9f0170f483c6ff138d5cf186
|
||||
a0a4dfd8937f66345c93ee7ebf5f85d53e05e9e8
|
||||
|
@ -1 +1,2 @@
|
||||
myfile content
|
||||
myfile content
|
||||
with a second line
|
@ -1 +0,0 @@
|
||||
my commit message
|
@ -1 +0,0 @@
|
||||
ref: refs/heads/master
|
@ -1,12 +0,0 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
[user]
|
||||
email = CI@example.com
|
||||
name = CI
|
||||
[commit]
|
||||
gpgSign = false
|
||||
[protocol "file"]
|
||||
allow = always
|
@ -1 +0,0 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
# git ls-files --others --exclude-from=.git/info/exclude
|
||||
# Lines that start with '#' are comments.
|
||||
# For a project mostly in C, the following would be a good set of
|
||||
# exclude patterns (uncomment them if you want to use them):
|
||||
# *.[oa]
|
||||
# *~
|
@ -1 +0,0 @@
|
||||
0000000000000000000000000000000000000000 28f8e24755d8792e66738e36f193949a68021709 CI <CI@example.com> 1669566470 +0100 commit (initial): my commit message
|
@ -1 +0,0 @@
|
||||
0000000000000000000000000000000000000000 28f8e24755d8792e66738e36f193949a68021709 CI <CI@example.com> 1669566470 +0100 commit (initial): my commit message
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
28f8e24755d8792e66738e36f193949a68021709
|
@ -1 +0,0 @@
|
||||
myfile content
|
@ -1 +0,0 @@
|
||||
myfile2 content
|
Binary file not shown.
@ -1 +1 @@
|
||||
0000000000000000000000000000000000000000 d46951396fe8179592ec90aee0c0414fc0512fc5 CI <CI@example.com> 1669566705 +0100 commit (initial): my commit message
|
||||
0000000000000000000000000000000000000000 109e5843c76c640d7075c2897b5720f1714df776 CI <CI@example.com> 1669569750 +0100 commit (initial): my commit message
|
||||
|
@ -1 +1 @@
|
||||
0000000000000000000000000000000000000000 d46951396fe8179592ec90aee0c0414fc0512fc5 CI <CI@example.com> 1669566705 +0100 commit (initial): my commit message
|
||||
0000000000000000000000000000000000000000 109e5843c76c640d7075c2897b5720f1714df776 CI <CI@example.com> 1669569750 +0100 commit (initial): my commit message
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
x��K
|
||||
�0@]��$ ��D��z�L2~�!�F��[�n��J3�wH������*�5�K�IQt1�DA�<V�.���-0�p�泾�=z(�N�Rb����{��m��O��~ ��k���m�1|
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
x+)JMU06a040031QȭL��Ie`x�f��vYR��j�\�~�]�t��
|
@ -1 +1 @@
|
||||
d46951396fe8179592ec90aee0c0414fc0512fc5
|
||||
109e5843c76c640d7075c2897b5720f1714df776
|
||||
|
@ -1 +1,2 @@
|
||||
myfile content
|
||||
myfile content
|
||||
with a second line
|
Reference in New Issue
Block a user