mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-27 22:38:09 +02: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:
|
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.
|
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���
|
||||||
|
�0E]�+f/ȤӼ@D��;w���
|
||||||
|
Ɩ��7�����p����l`�.C��8z��H�y$ռX҈ف]_��]�
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
|
|||||||
|
x��A
|
||||||
|
�0@Ѯs��ʌN&�\y��L�`�H
|
||||||
|
����~�XKY˭��*1c��
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
x��M
|
||||||
|
�0@a�9E��d~2퀈�U���,[J��=��Ƿxy�ui�Om7��#���y6+*j�e�Ef�)d���^�S��M{��8ba������f�.��c��0��0������K^�̓D��.�3��Q��frW�ey�\+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