mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-25 18:55:28 -06:00
add integration test to ensure we don't run into issues with popup focus
This commit is contained in:
@@ -7,7 +7,7 @@ Integration tests are located in `test/integration`. Each test will run a bash s
|
||||
An example of a `test.json` is:
|
||||
|
||||
```
|
||||
{ "description": "stage a file and commit the change", "speed": 20 }
|
||||
{ "description": "Open a confirmation, then open a menu over that, then close the menu. Verify that the confirmation popup also closes automatically", "speed": 20 }
|
||||
```
|
||||
|
||||
The `speed` key refers to the playback speed as a multiple of the original recording speed. So 20 means the test will run 20 times faster than the original recording speed. If a test fails for a given speed, it will drop the speed and re-test, until finally attempting the test at the original speed. If you omit the speed, it will default to 10.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
WIP
|
||||
1
test/integration/popupFocus/expected/repo/.git_keep/HEAD
Normal file
1
test/integration/popupFocus/expected/repo/.git_keep/HEAD
Normal file
@@ -0,0 +1 @@
|
||||
ref: refs/heads/master
|
||||
10
test/integration/popupFocus/expected/repo/.git_keep/config
Normal file
10
test/integration/popupFocus/expected/repo/.git_keep/config
Normal file
@@ -0,0 +1,10 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
||||
[user]
|
||||
email = CI@example.com
|
||||
name = CI
|
||||
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
BIN
test/integration/popupFocus/expected/repo/.git_keep/index
Normal file
BIN
test/integration/popupFocus/expected/repo/.git_keep/index
Normal file
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
# 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]
|
||||
# *~
|
||||
.DS_Store
|
||||
@@ -0,0 +1,3 @@
|
||||
0000000000000000000000000000000000000000 353cce986c61f361452f43522426c120b4ee9461 CI <CI@example.com> 1659355870 +1000 commit (initial): myfile1
|
||||
353cce986c61f361452f43522426c120b4ee9461 6ecdae79ff53548670039abee9008b6bb36cdf4f CI <CI@example.com> 1659355870 +1000 commit: myfile2
|
||||
6ecdae79ff53548670039abee9008b6bb36cdf4f 0478d727ea0ebf57ed9ca85acef9e60a324d86f0 CI <CI@example.com> 1659355876 +1000 commit: WIP
|
||||
@@ -0,0 +1,3 @@
|
||||
0000000000000000000000000000000000000000 353cce986c61f361452f43522426c120b4ee9461 CI <CI@example.com> 1659355870 +1000 commit (initial): myfile1
|
||||
353cce986c61f361452f43522426c120b4ee9461 6ecdae79ff53548670039abee9008b6bb36cdf4f CI <CI@example.com> 1659355870 +1000 commit: myfile2
|
||||
6ecdae79ff53548670039abee9008b6bb36cdf4f 0478d727ea0ebf57ed9ca85acef9e60a324d86f0 CI <CI@example.com> 1659355876 +1000 commit: WIP
|
||||
@@ -0,0 +1,3 @@
|
||||
x<01><><EFBFBD>
|
||||
<EFBFBD>0E]<5D>+f/ȤӼ@D<><44>;w<><77><EFBFBD>
|
||||
Ɩ<12><>7<EFBFBD><37><EFBFBD><EFBFBD><EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD>l`<1E>.C<><43>8z<38><7A>H<EFBFBD>y$ռX҈ف]_<16><>]<5D>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
x<01><>A
|
||||
<EFBFBD>0@Ѯs<D1AE><73>ʌN&<11>\y<><79>L<EFBFBD>`<60>H
|
||||
<EFBFBD><EFBFBD><EFBFBD><08>~<1E>XKY˭<1D><>*1c<31><63>
|
||||
@@ -0,0 +1,2 @@
|
||||
x<01><>M
|
||||
<EFBFBD>0@a<>9E<39><45>d~2퀈<32>U<EFBFBD><55><EFBFBD>,[J<04><>=<3D><>Ƿxy<78>ui<1E>Om7<6D><37>#<23><14><>y6+*j<>e<12>Ef<45>)d<10><><EFBFBD>^<5E>S<EFBFBD><53>M{<7B><02>8ba<62><61><EFBFBD><EFBFBD><01><>f<EFBFBD>.<2E><>c<EFBFBD><63>0<EFBFBD><30>0<EFBFBD><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>K^<5E>̓D<CD83><18>.<2E>3<EFBFBD><10>Q<EFBFBD><51>frW<72>ey<1A>\+9>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
0478d727ea0ebf57ed9ca85acef9e60a324d86f0
|
||||
1
test/integration/popupFocus/expected/repo/myfile1
Normal file
1
test/integration/popupFocus/expected/repo/myfile1
Normal file
@@ -0,0 +1 @@
|
||||
test1
|
||||
1
test/integration/popupFocus/expected/repo/myfile2
Normal file
1
test/integration/popupFocus/expected/repo/myfile2
Normal file
@@ -0,0 +1 @@
|
||||
test2
|
||||
1
test/integration/popupFocus/expected/repo/myfile3
Normal file
1
test/integration/popupFocus/expected/repo/myfile3
Normal file
@@ -0,0 +1 @@
|
||||
test3
|
||||
1
test/integration/popupFocus/recording.json
Normal file
1
test/integration/popupFocus/recording.json
Normal file
@@ -0,0 +1 @@
|
||||
{"KeyEvents":[{"Timestamp":607,"Mod":0,"Key":259,"Ch":0},{"Timestamp":745,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1304,"Mod":0,"Key":256,"Ch":82},{"Timestamp":2087,"Mod":2,"Key":18,"Ch":18},{"Timestamp":2894,"Mod":0,"Key":27,"Ch":0},{"Timestamp":3553,"Mod":0,"Key":260,"Ch":0},{"Timestamp":3697,"Mod":0,"Key":260,"Ch":0},{"Timestamp":4064,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4376,"Mod":0,"Key":256,"Ch":119},{"Timestamp":4745,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5200,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":238,"Height":61}]}
|
||||
18
test/integration/popupFocus/setup.sh
Normal file
18
test/integration/popupFocus/setup.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cd $1
|
||||
|
||||
git init
|
||||
|
||||
git config user.email "CI@example.com"
|
||||
git config user.name "CI"
|
||||
|
||||
echo test1 > myfile1
|
||||
git add .
|
||||
git commit -am "myfile1"
|
||||
echo test2 > myfile2
|
||||
git add .
|
||||
git commit -am "myfile2"
|
||||
echo test3 > myfile3
|
||||
1
test/integration/popupFocus/test.json
Normal file
1
test/integration/popupFocus/test.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "description": "stage a file and commit the change", "speed": 15 }
|
||||
Reference in New Issue
Block a user