commit integrations test with window name's assertion

This commit is contained in:
Arnaud PERALTA 2022-11-27 18:24:00 +01:00 committed by Jesse Duffield
parent 87e0f6b92d
commit bfcbf228bf
43 changed files with 27 additions and 46 deletions

View file

@ -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")
},
})

View file

@ -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")
},
})

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,2 @@
x<01><>M
Т0o/H~<7E>ЄЁЋу%љPСGJAooС Иf<>вD<1E><><0F>Оd<>Г(9ЧXkЮYћq(`$g<6C>ctЮйЈјеяmЅiІѓ4_ёfY<66>8<EFBFBD>&2!$в0Z:jЃЕкщ>щјSWђЁ_B<5F>mуд-є0ъ

View file

@ -1,2 +0,0 @@
x<01><>A
Â0E]ç³$™iÆD„®zŒ1<C592>ªà<C2AA>ÒFÐÛðnþâñ?³G…yWWU QœæcX)§._Ã,N„œCtòª÷²Â0Âi[žzÈÅΘûÈmö>xïm'UÿÔ<C3BF>}à—€é¶ÉMÝ0

View file

@ -1 +1 @@
ef3197feca3fdc5b9f0170f483c6ff138d5cf186
a0a4dfd8937f66345c93ee7ebf5f85d53e05e9e8

View file

@ -1 +1,2 @@
myfile content
with a second line

View file

@ -1 +0,0 @@
ref: refs/heads/master

View file

@ -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

View file

@ -1 +0,0 @@
Unnamed repository; edit this file 'description' to name the repository.

View file

@ -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]
# *~

View file

@ -1 +0,0 @@
0000000000000000000000000000000000000000 28f8e24755d8792e66738e36f193949a68021709 CI <CI@example.com> 1669566470 +0100 commit (initial): my commit message

View file

@ -1 +0,0 @@
0000000000000000000000000000000000000000 28f8e24755d8792e66738e36f193949a68021709 CI <CI@example.com> 1669566470 +0100 commit (initial): my commit message

View file

@ -1 +0,0 @@
28f8e24755d8792e66738e36f193949a68021709

View file

@ -1 +0,0 @@
myfile content

View file

@ -1 +0,0 @@
myfile2 content

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,2 @@
x<01><>K
Â0@]ç³$ <09>D„®zŒL2~À!ÒFÐÛ[ðnïñJ3»wH»¾¨²”*È5—KŒIQt 1ŠDAª<VÉ.¿ú­-0Ípœæ³¾³=z(ÍNˆRbô°÷Á{·ÑmÒõOÝÙ~ ˜®k¾ªûm±1|

View file

@ -0,0 +1 @@
x+)JMU06a040031QČ­LËĚIe`xäf×ĹvYRú†j°\ě~µ]‡tł ö Î

View file

@ -1 +1 @@
d46951396fe8179592ec90aee0c0414fc0512fc5
109e5843c76c640d7075c2897b5720f1714df776

View file

@ -1 +1,2 @@
myfile content
with a second line