1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-08 22:52:12 +02:00

add integration test to ensure we don't run into issues with popup focus

This commit is contained in:
Jesse Duffield
2022-08-01 22:13:08 +10:00
parent 3ee2ad511e
commit 932b0b593e
26 changed files with 59 additions and 1 deletions

View File

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

View File

@@ -0,0 +1 @@
WIP

View File

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

View 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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,3 @@
x���
�0E]�+f/ȤӼ@D��;w���
Ɩ��7�����p����l`�.C��8z��H�y$ռX҈ ف]_��]�

View File

@@ -0,0 +1,3 @@
x��A
�0@Ѯs��ʌN&�\y��L�`�H
����~�XKY˭��*1c��

View File

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

View File

@@ -0,0 +1 @@
0478d727ea0ebf57ed9ca85acef9e60a324d86f0

View File

@@ -0,0 +1 @@
test1

View File

@@ -0,0 +1 @@
test2

View File

@@ -0,0 +1 @@
test3

View 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}]}

View 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

View File

@@ -0,0 +1 @@
{ "description": "stage a file and commit the change", "speed": 15 }