diff --git a/pkg/integration/tests/misc/initial_open.go b/pkg/integration/tests/misc/initial_open.go new file mode 100644 index 000000000..cc4146fc6 --- /dev/null +++ b/pkg/integration/tests/misc/initial_open.go @@ -0,0 +1,24 @@ +package misc + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var InitialOpen = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Confirms a popup appears on first opening Lazygit", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) { + config.UserConfig.DisableStartupPopups = false + }, + SetupRepo: func(shell *Shell) {}, + Run: func(t *TestDriver, keys config.KeybindingConfig) { + t.ExpectPopup().Confirmation(). + Title(Equals("")). + Content(Contains("Thanks for using lazygit!")). + Confirm() + + t.Views().Files().IsFocused() + }, +}) diff --git a/pkg/integration/tests/tests_gen.go b/pkg/integration/tests/tests_gen.go index 495fb16ed..ecd0ced70 100644 --- a/pkg/integration/tests/tests_gen.go +++ b/pkg/integration/tests/tests_gen.go @@ -64,6 +64,7 @@ var tests = []*components.IntegrationTest{ interactive_rebase.AmendMerge, interactive_rebase.One, misc.ConfirmOnQuit, + misc.InitialOpen, patch_building.CopyPatchToClipboard, stash.Rename, stash.Stash, diff --git a/test/integration/initialOpen/config/config.yml b/test/integration/initialOpen/config/config.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/initialOpen/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/initialOpen/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index d72af3146..000000000 --- a/test/integration/initialOpen/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -asd diff --git a/test/integration/initialOpen/expected/repo/.git_keep/FETCH_HEAD b/test/integration/initialOpen/expected/repo/.git_keep/FETCH_HEAD deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/integration/initialOpen/expected/repo/.git_keep/HEAD b/test/integration/initialOpen/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/initialOpen/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/initialOpen/expected/repo/.git_keep/config b/test/integration/initialOpen/expected/repo/.git_keep/config deleted file mode 100644 index 8ae104545..000000000 --- a/test/integration/initialOpen/expected/repo/.git_keep/config +++ /dev/null @@ -1,10 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = false - logallrefupdates = true - ignorecase = true - precomposeunicode = true -[user] - email = CI@example.com - name = CI diff --git a/test/integration/initialOpen/expected/repo/.git_keep/description b/test/integration/initialOpen/expected/repo/.git_keep/description deleted file mode 100644 index 498b267a8..000000000 --- a/test/integration/initialOpen/expected/repo/.git_keep/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/initialOpen/expected/repo/.git_keep/index b/test/integration/initialOpen/expected/repo/.git_keep/index deleted file mode 100644 index 825adac84..000000000 Binary files a/test/integration/initialOpen/expected/repo/.git_keep/index and /dev/null differ diff --git a/test/integration/initialOpen/expected/repo/.git_keep/info/exclude b/test/integration/initialOpen/expected/repo/.git_keep/info/exclude deleted file mode 100644 index 8e9f2071f..000000000 --- a/test/integration/initialOpen/expected/repo/.git_keep/info/exclude +++ /dev/null @@ -1,7 +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] -# *~ -.DS_Store diff --git a/test/integration/initialOpen/expected/repo/.git_keep/logs/HEAD b/test/integration/initialOpen/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 9728b11df..000000000 --- a/test/integration/initialOpen/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 46f86259c48ec60496e43d9c962e32f40e7cdefb CI 1617799345 +1000 commit (initial): myfile1 -46f86259c48ec60496e43d9c962e32f40e7cdefb e4776798a2a73374b45e6321b60b5578b9fb590c CI 1617799348 +1000 commit: asd diff --git a/test/integration/initialOpen/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/initialOpen/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 9728b11df..000000000 --- a/test/integration/initialOpen/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,2 +0,0 @@ -0000000000000000000000000000000000000000 46f86259c48ec60496e43d9c962e32f40e7cdefb CI 1617799345 +1000 commit (initial): myfile1 -46f86259c48ec60496e43d9c962e32f40e7cdefb e4776798a2a73374b45e6321b60b5578b9fb590c CI 1617799348 +1000 commit: asd diff --git a/test/integration/initialOpen/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/initialOpen/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4ee..000000000 Binary files a/test/integration/initialOpen/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 and /dev/null differ diff --git a/test/integration/initialOpen/expected/repo/.git_keep/objects/46/f86259c48ec60496e43d9c962e32f40e7cdefb b/test/integration/initialOpen/expected/repo/.git_keep/objects/46/f86259c48ec60496e43d9c962e32f40e7cdefb deleted file mode 100644 index c38595873..000000000 Binary files a/test/integration/initialOpen/expected/repo/.git_keep/objects/46/f86259c48ec60496e43d9c962e32f40e7cdefb and /dev/null differ diff --git a/test/integration/initialOpen/expected/repo/.git_keep/objects/62/b35f5751dd871e0908247223d276b5efeb4cb4 b/test/integration/initialOpen/expected/repo/.git_keep/objects/62/b35f5751dd871e0908247223d276b5efeb4cb4 deleted file mode 100644 index dff6f06c8..000000000 Binary files a/test/integration/initialOpen/expected/repo/.git_keep/objects/62/b35f5751dd871e0908247223d276b5efeb4cb4 and /dev/null differ diff --git a/test/integration/initialOpen/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/initialOpen/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 deleted file mode 100644 index 285df3e5f..000000000 Binary files a/test/integration/initialOpen/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 and /dev/null differ diff --git a/test/integration/initialOpen/expected/repo/.git_keep/objects/e4/776798a2a73374b45e6321b60b5578b9fb590c b/test/integration/initialOpen/expected/repo/.git_keep/objects/e4/776798a2a73374b45e6321b60b5578b9fb590c deleted file mode 100644 index 013f3deb3..000000000 --- a/test/integration/initialOpen/expected/repo/.git_keep/objects/e4/776798a2a73374b45e6321b60b5578b9fb590c +++ /dev/null @@ -1,2 +0,0 @@ -xM -1 @a=Ei6 "c'Eqw-^]18M2zSHH7\v-T 5o' VVM0N6ϸ/M|S]ub>5Onq8 \ No newline at end of file diff --git a/test/integration/initialOpen/expected/repo/.git_keep/refs/heads/master b/test/integration/initialOpen/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index 89a4ee75f..000000000 --- a/test/integration/initialOpen/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -e4776798a2a73374b45e6321b60b5578b9fb590c diff --git a/test/integration/initialOpen/expected/repo/myfile1 b/test/integration/initialOpen/expected/repo/myfile1 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/initialOpen/expected/repo/myfile1 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/initialOpen/expected/repo/myfile2 b/test/integration/initialOpen/expected/repo/myfile2 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/initialOpen/expected/repo/myfile2 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/initialOpen/recording.json b/test/integration/initialOpen/recording.json deleted file mode 100644 index 2fdf83dc0..000000000 --- a/test/integration/initialOpen/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":891,"Mod":0,"Key":27,"Ch":0},{"Timestamp":1344,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1639,"Mod":0,"Key":256,"Ch":99},{"Timestamp":2128,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2176,"Mod":0,"Key":256,"Ch":115},{"Timestamp":2280,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2592,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2960,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/initialOpen/setup.sh b/test/integration/initialOpen/setup.sh deleted file mode 100644 index e7de1949f..000000000 --- a/test/integration/initialOpen/setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/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 test1 > myfile2 diff --git a/test/integration/initialOpen/test.json b/test/integration/initialOpen/test.json deleted file mode 100644 index f7fd28fab..000000000 --- a/test/integration/initialOpen/test.json +++ /dev/null @@ -1 +0,0 @@ -{ "description": "testing the initial popup appears when first starting lazygit", "speed": 15 }