From fed2aaf37f85c1417d41c359c15e1fb0cd8087ec Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 14 Aug 2022 21:18:12 +1000 Subject: [PATCH] migrate menuFromCommand integration test --- pkg/integration/components/assert.go | 10 +-- .../custom_commands/menu_from_command.go | 74 ++++++++++++++++++ pkg/integration/tests/tests.go | 1 + .../customCommandsComplex/config/config.yml | 31 -------- .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 - .../expected/repo/.git_keep/HEAD | 1 - .../expected/repo/.git_keep/index | Bin 433 -> 0 bytes .../expected/repo/.git_keep/logs/HEAD | 5 -- .../repo/.git_keep/logs/refs/heads/master | 5 -- .../05/3cf208ac3728c36c6ed86f2a03a1fb72a8e6bc | Bin 162 -> 0 bytes .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 103 -> 0 bytes .../2f/6174050380438f14b16658a356e762435ca591 | Bin 128 -> 0 bytes .../4f/dfedfd9d406506be8b02f5b863dbc08d43cc9f | Bin 150 -> 0 bytes .../54/28838691c97ac192c8b8e1c3f573d8541a94b6 | Bin 146 -> 0 bytes .../7d/b446a082f8c10183f1f27178698f07f3750b6b | Bin 53 -> 0 bytes .../7d/d93a4be3d27d40fbe791d6d77e0d2fedc4d785 | Bin 149 -> 0 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 77 -> 0 bytes .../ab/38b1ca116f77648925d952e731f419db360cdb | 2 - .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../f7/08d3e3819470a69f6c8562ff1e68eef02f8cac | 2 - .../expected/repo/.git_keep/refs/heads/master | 1 - .../expected/repo/myfile1 | 1 - .../expected/repo/myfile2 | 1 - .../expected/repo/myfile3 | 1 - .../expected/repo/myfile4 | 1 - .../expected/repo/output.txt | 1 - .../customCommandsComplex/recording.json | 1 - .../customCommandsComplex/setup.sh | 23 ------ .../customCommandsComplex/test.json | 4 - .../expected/repo/.git_keep/COMMIT_EDITMSG | 1 + .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 1 + .../expected/repo/.git_keep/config | 0 .../expected/repo/.git_keep/description | 0 .../expected/repo/.git_keep/index | Bin 0 -> 65 bytes .../expected/repo/.git_keep/info/exclude | 0 .../expected/repo/.git_keep/logs/HEAD | 4 + .../.git_keep/logs/refs/heads/feature/foo | 1 + .../repo/.git_keep/logs/refs/heads/master | 3 + .../16/919871d6b442beac07e1573c557ca433cff356 | Bin 0 -> 147 bytes .../4b/825dc642cb6eb9a060e54bf8d69288fbee4904 | Bin 0 -> 15 bytes .../af/550d3777f20bf024ad55c9c796e7e85ef32ccb | Bin 0 -> 146 bytes .../d5/0975554a574b9c66e109927fdb4edfb6bbadb3 | 3 + .../repo/.git_keep/refs/heads/feature/foo | 1 + .../expected/repo/.git_keep/refs/heads/master | 1 + .../expected/repo/output.txt | 1 + 50 files changed, 96 insertions(+), 86 deletions(-) create mode 100644 pkg/integration/tests/custom_commands/menu_from_command.go delete mode 100644 test/integration/customCommandsComplex/config/config.yml delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/COMMIT_EDITMSG delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/HEAD delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/index delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/05/3cf208ac3728c36c6ed86f2a03a1fb72a8e6bc delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/4f/dfedfd9d406506be8b02f5b863dbc08d43cc9f delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/54/28838691c97ac192c8b8e1c3f573d8541a94b6 delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/7d/b446a082f8c10183f1f27178698f07f3750b6b delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/7d/d93a4be3d27d40fbe791d6d77e0d2fedc4d785 delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/ab/38b1ca116f77648925d952e731f419db360cdb delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/objects/f7/08d3e3819470a69f6c8562ff1e68eef02f8cac delete mode 100644 test/integration/customCommandsComplex/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/customCommandsComplex/expected/repo/myfile1 delete mode 100644 test/integration/customCommandsComplex/expected/repo/myfile2 delete mode 100644 test/integration/customCommandsComplex/expected/repo/myfile3 delete mode 100644 test/integration/customCommandsComplex/expected/repo/myfile4 delete mode 100644 test/integration/customCommandsComplex/expected/repo/output.txt delete mode 100644 test/integration/customCommandsComplex/recording.json delete mode 100644 test/integration/customCommandsComplex/setup.sh delete mode 100644 test/integration/customCommandsComplex/test.json create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/COMMIT_EDITMSG rename test/{integration/customCommandsComplex => integration_new/custom_commands/menu_from_command}/expected/repo/.git_keep/FETCH_HEAD (100%) create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/HEAD rename test/{integration/customCommandsComplex => integration_new/custom_commands/menu_from_command}/expected/repo/.git_keep/config (100%) rename test/{integration/customCommandsComplex => integration_new/custom_commands/menu_from_command}/expected/repo/.git_keep/description (100%) create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/index rename test/{integration/customCommandsComplex => integration_new/custom_commands/menu_from_command}/expected/repo/.git_keep/info/exclude (100%) create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/logs/HEAD create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/logs/refs/heads/feature/foo create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/logs/refs/heads/master create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/16/919871d6b442beac07e1573c557ca433cff356 create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/af/550d3777f20bf024ad55c9c796e7e85ef32ccb create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/d5/0975554a574b9c66e109927fdb4edfb6bbadb3 create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/refs/heads/feature/foo create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/refs/heads/master create mode 100644 test/integration_new/custom_commands/menu_from_command/expected/repo/output.txt diff --git a/pkg/integration/components/assert.go b/pkg/integration/components/assert.go index a5ad0aaf7..ae363eb8d 100644 --- a/pkg/integration/components/assert.go +++ b/pkg/integration/components/assert.go @@ -52,7 +52,7 @@ func Contains(target string) *matcher { func Equals(target string) *matcher { return &matcher{testFn: func(value string) (bool, string) { - return target == value, fmt.Sprintf("Expected '%T' to equal '%T'", value, target) + return target == value, fmt.Sprintf("Expected '%s' to equal '%s'", value, target) }} } @@ -123,14 +123,14 @@ func (self *Assert) MatchSelectedLine(matcher *matcher) { func (self *Assert) InPrompt() { self.assertWithRetries(func() (bool, string) { currentView := self.gui.CurrentContext().GetView() - return currentView.Name() == "confirmation" && currentView.Editable, fmt.Sprintf("Expected prompt popup to be focused") + return currentView.Name() == "confirmation" && currentView.Editable, "Expected prompt popup to be focused" }) } func (self *Assert) InConfirm() { self.assertWithRetries(func() (bool, string) { currentView := self.gui.CurrentContext().GetView() - return currentView.Name() == "confirmation" && !currentView.Editable, fmt.Sprintf("Expected confirmation popup to be focused") + return currentView.Name() == "confirmation" && !currentView.Editable, "Expected confirmation popup to be focused" }) } @@ -138,13 +138,13 @@ func (self *Assert) InAlert() { // basically the same thing as a confirmation popup with the current implementation self.assertWithRetries(func() (bool, string) { currentView := self.gui.CurrentContext().GetView() - return currentView.Name() == "confirmation" && !currentView.Editable, fmt.Sprintf("Expected alert popup to be focused") + return currentView.Name() == "confirmation" && !currentView.Editable, "Expected alert popup to be focused" }) } func (self *Assert) InMenu() { self.assertWithRetries(func() (bool, string) { - return self.gui.CurrentContext().GetView().Name() == "menu", fmt.Sprintf("Expected popup menu to be focused") + return self.gui.CurrentContext().GetView().Name() == "menu", "Expected popup menu to be focused" }) } diff --git a/pkg/integration/tests/custom_commands/menu_from_command.go b/pkg/integration/tests/custom_commands/menu_from_command.go new file mode 100644 index 000000000..f45d820d6 --- /dev/null +++ b/pkg/integration/tests/custom_commands/menu_from_command.go @@ -0,0 +1,74 @@ +package custom_commands + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +// NOTE: we're getting a weird offset in the popup prompt for some reason. Not sure what's behind that. + +var MenuFromCommand = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Using menuFromCommand prompt type", + ExtraCmdArgs: "", + Skip: false, + SetupRepo: func(shell *Shell) { + shell. + EmptyCommit("foo"). + EmptyCommit("bar"). + EmptyCommit("baz"). + NewBranch("feature/foo") + }, + SetupConfig: func(cfg *config.AppConfig) { + cfg.UserConfig.CustomCommands = []config.CustomCommand{ + { + Key: "a", + Context: "localBranches", + Command: `echo "{{index .PromptResponses 0}} {{index .PromptResponses 1}} {{ .SelectedLocalBranch.Name }}" > output.txt`, + Prompts: []config.CustomCommandPrompt{ + { + Type: "menuFromCommand", + Title: "Choose commit message", + Command: `git log --oneline --pretty=%B`, + Filter: `(?P.*)`, + ValueFormat: `{{ .commit_message }}`, + LabelFormat: `{{ .commit_message | yellow }}`, + }, + { + Type: "input", + Title: "Description", + InitialValue: `{{ if .SelectedLocalBranch.Name }}Branch: #{{ .SelectedLocalBranch.Name }}{{end}}`, + }, + }, + }, + } + }, + Run: func( + shell *Shell, + input *Input, + assert *Assert, + keys config.KeybindingConfig, + ) { + assert.WorkingTreeFileCount(0) + input.SwitchToBranchesWindow() + + input.PressKeys("a") + + assert.InMenu() + assert.MatchCurrentViewTitle(Equals("Choose commit message")) + assert.MatchSelectedLine(Equals("baz")) + input.NextItem() + assert.MatchSelectedLine(Equals("bar")) + input.Confirm() + + assert.InPrompt() + assert.MatchCurrentViewTitle(Equals("Description")) + input.Type(" my branch") + input.Confirm() + + input.SwitchToFilesWindow() + + assert.WorkingTreeFileCount(1) + assert.MatchSelectedLine(Contains("output.txt")) + assert.MatchMainViewContent(Contains("bar Branch: #feature/foo my branch feature/foo")) + }, +}) diff --git a/pkg/integration/tests/tests.go b/pkg/integration/tests/tests.go index bbcb5c1d1..587ac8e30 100644 --- a/pkg/integration/tests/tests.go +++ b/pkg/integration/tests/tests.go @@ -26,6 +26,7 @@ var tests = []*components.IntegrationTest{ interactive_rebase.One, custom_commands.Basic, custom_commands.MultiplePrompts, + custom_commands.MenuFromCommand, } func GetTests() []*components.IntegrationTest { diff --git a/test/integration/customCommandsComplex/config/config.yml b/test/integration/customCommandsComplex/config/config.yml deleted file mode 100644 index 69072c2c7..000000000 --- a/test/integration/customCommandsComplex/config/config.yml +++ /dev/null @@ -1,31 +0,0 @@ -disableStartupPopups: true -customCommands: - - key: 'N' - description: 'Add file' - context: 'localBranches' - command: 'echo "{{index .PromptResponses 0}} {{index .PromptResponses 1}} {{index .PromptResponses 2}} {{ .SelectedLocalBranch.Name }}" > output.txt' - loadingText: 'Running custom command...' - prompts: - - type: 'menuFromCommand' - title: 'Title' - command: 'git log --oneline --pretty=%B' - filter: '(?P.*)' - valueFormat: '{{ .commit_message }}' - labelFormat: '{{ .commit_message | yellow }}' - - type: 'input' - title: 'Description' - initialValue: "{{ if .SelectedLocalBranch.Name }}Branch: #{{ .SelectedLocalBranch.Name }}{{end}}" - - type: 'menu' - title: 'yes or no' - options: - - name: 'no' - value: 'false' - - name: 'yes' - value: 'true' -gui: - theme: - activeBorderColor: - - green - - bold - SelectedRangeBgcolor: - - reverse diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/customCommandsComplex/expected/repo/.git_keep/COMMIT_EDITMSG deleted file mode 100644 index 9daeafb98..000000000 --- a/test/integration/customCommandsComplex/expected/repo/.git_keep/COMMIT_EDITMSG +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/HEAD b/test/integration/customCommandsComplex/expected/repo/.git_keep/HEAD deleted file mode 100644 index cb089cd89..000000000 --- a/test/integration/customCommandsComplex/expected/repo/.git_keep/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/index b/test/integration/customCommandsComplex/expected/repo/.git_keep/index deleted file mode 100644 index 005c7dd3432a5e4417c41b71044616cba9abb946..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 433 zcmZ?q402{*U|<4b*2G5)f-+{_G9X%de}E1nP>hL9sf~f5aR~zh<5!>>5g=w;y65p< z)zlkbB0{5h@|`XOc(rt2Wnj;(Ov}tkH3TXE>6cxyE&yzvTbT{ioOX0`BzS%pH7M;n z_j1*u@T&fnSK9L})M4frLCuk8cIyP2w`NT*)SM1lbsC)JqWRAQ*9L!&x=;mB9Ir<>{pV6_hSLrWKTYO21z4bZ-W{wHe9L0Ax zw}Q-3=uGi~x~B`x9L?G-ZVQ@z9As?%_^GfWv!DHQDR(vlSAJou&5-3{e9gaW-@)B7(jxmf!XwVi F0RS_jgP;Ha diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/logs/HEAD b/test/integration/customCommandsComplex/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 605138dc1..000000000 --- a/test/integration/customCommandsComplex/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,5 +0,0 @@ -0000000000000000000000000000000000000000 ab38b1ca116f77648925d952e731f419db360cdb CI 1642201096 +1100 commit (initial): myfile1 -ab38b1ca116f77648925d952e731f419db360cdb 4fdfedfd9d406506be8b02f5b863dbc08d43cc9f CI 1642201096 +1100 commit: myfile2 -4fdfedfd9d406506be8b02f5b863dbc08d43cc9f 7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 CI 1642201096 +1100 commit: myfile3 -7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 f708d3e3819470a69f6c8562ff1e68eef02f8cac CI 1642201096 +1100 commit: myfile4 -f708d3e3819470a69f6c8562ff1e68eef02f8cac 5428838691c97ac192c8b8e1c3f573d8541a94b6 CI 1642201104 +1100 commit: test diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/customCommandsComplex/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 605138dc1..000000000 --- a/test/integration/customCommandsComplex/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,5 +0,0 @@ -0000000000000000000000000000000000000000 ab38b1ca116f77648925d952e731f419db360cdb CI 1642201096 +1100 commit (initial): myfile1 -ab38b1ca116f77648925d952e731f419db360cdb 4fdfedfd9d406506be8b02f5b863dbc08d43cc9f CI 1642201096 +1100 commit: myfile2 -4fdfedfd9d406506be8b02f5b863dbc08d43cc9f 7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 CI 1642201096 +1100 commit: myfile3 -7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 f708d3e3819470a69f6c8562ff1e68eef02f8cac CI 1642201096 +1100 commit: myfile4 -f708d3e3819470a69f6c8562ff1e68eef02f8cac 5428838691c97ac192c8b8e1c3f573d8541a94b6 CI 1642201104 +1100 commit: test diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/05/3cf208ac3728c36c6ed86f2a03a1fb72a8e6bc b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/05/3cf208ac3728c36c6ed86f2a03a1fb72a8e6bc deleted file mode 100644 index 161576b974e9b9deef2184d7d5d91dd2f45c9d77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmV;T0A2rh0V^p=O;s>7w_q?dFfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL z8byf-!zGiW55oT$9V>g4{^GR7m!#NRuS1|p@=Hq!N=x)gDoPk?x4126`f-r4`QxX; Qip+lY&!ybi0CKBLMVoq2_W%F@ diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmb~ZE#08nZNMgRZ+ diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce deleted file mode 100644 index 0a734f98100d24e67455a3cfa8497adaccc7a422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8UTCqE3ZN5G4lWb diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 deleted file mode 100644 index 31ae3f5ba89b96ad2e268134913bd913a0bc46d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmV-`0Du2@0V^p=O;s>7F<>w>FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL i8byf-!zGiW55oT$9V>g4{^GR7m!#NRuR{Q5NjxpS$UUzB diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/4f/dfedfd9d406506be8b02f5b863dbc08d43cc9f b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/4f/dfedfd9d406506be8b02f5b863dbc08d43cc9f deleted file mode 100644 index 5bcc5c659f7e61659d4d6a4d24f24dd70ae41c98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 150 zcmV;H0BQet0gcX03c@fDKw;N8MfQSZCh4RDB0^U^Mt)|nU~DN7^!D}$ZXe&`m9@2{ zTi|f&yNFHE2S@{}t5rmqSco-~rxA%NVs?rF$ZTnsSGOtqF+)iJq%l$$8HdUPO7x%s zxMokT)NInbKi1t&v%OC9T|TL8Pq~z}-7HW*bl{lm8NfMn)MKj4pWL*sE>A)81FqUR E;VK_U4FCWD diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/54/28838691c97ac192c8b8e1c3f573d8541a94b6 b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/54/28838691c97ac192c8b8e1c3f573d8541a94b6 deleted file mode 100644 index bd598d7abbbfab35511a5e7f9b7a8b28a4cac2c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 zcmV;D0B!$x0gaA93c^4P06p(3_AW>^+h$V`5qjz~(wLy&+EQ2W`SuB3<}l1*bgA{x zVj9w+ZDtYrtd78>3S>z>7Zf&{HLSAPt3@xsw``fy&=n9GoRoV)_hiIo z4(P0+K|bxiY;m08d7Q5HmAXFdq)WZTL>(fe1YJDtgs|Ivs@b1;X!dU52V?3vzv_TU AvH$=8 diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/7d/b446a082f8c10183f1f27178698f07f3750b6b b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/7d/b446a082f8c10183f1f27178698f07f3750b6b deleted file mode 100644 index 6de444c0ffeb960a235f0866432d39eb29d91167..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53 zcmbeg#jsajL@5C#ZEVgaW^iGgZi zh}9EwQj_2Px$btH>}{ML^2u#mz diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 deleted file mode 100644 index 285df3e5fbab12262e28d85e78af8a31cd0024c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb`~^A08nuUMF0Q* diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 deleted file mode 100644 index 96d2e71a6af75cdd27ac5d9628a27faecc40fb66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/ab/38b1ca116f77648925d952e731f419db360cdb b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/ab/38b1ca116f77648925d952e731f419db360cdb deleted file mode 100644 index 3de7c78a7..000000000 --- a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/ab/38b1ca116f77648925d952e731f419db360cdb +++ /dev/null @@ -1,2 +0,0 @@ -xA -0@ѮsL:#)1P!")#tyS5[˥*`5df 9T:KL⧽qzm[ @#a/p%Btg='MξeY.,, \ No newline at end of file diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 deleted file mode 100644 index d39fa7d2fecf1c45a132dfe3a8758952f3c8d968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb}lpN08nuUO8@`> diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b deleted file mode 100644 index 9b771fc2f6f41f91b00976b4ff3f8f9935f7931e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb>`CU&08otwO#lD@ diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/f7/08d3e3819470a69f6c8562ff1e68eef02f8cac b/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/f7/08d3e3819470a69f6c8562ff1e68eef02f8cac deleted file mode 100644 index 010f8e879..000000000 --- a/test/integration/customCommandsComplex/expected/repo/.git_keep/objects/f7/08d3e3819470a69f6c8562ff1e68eef02f8cac +++ /dev/null @@ -1,2 +0,0 @@ -xA -0@Q9E$I"BW=F`R"~◵[Lt껪u1*Ҍa>FvC!nHfYcBaQA\U)$q&c88KY"s؞QrӾuy*39 \ No newline at end of file diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/refs/heads/master b/test/integration/customCommandsComplex/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index 8d1ca4f04..000000000 --- a/test/integration/customCommandsComplex/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -5428838691c97ac192c8b8e1c3f573d8541a94b6 diff --git a/test/integration/customCommandsComplex/expected/repo/myfile1 b/test/integration/customCommandsComplex/expected/repo/myfile1 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/customCommandsComplex/expected/repo/myfile1 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/customCommandsComplex/expected/repo/myfile2 b/test/integration/customCommandsComplex/expected/repo/myfile2 deleted file mode 100644 index 180cf8328..000000000 --- a/test/integration/customCommandsComplex/expected/repo/myfile2 +++ /dev/null @@ -1 +0,0 @@ -test2 diff --git a/test/integration/customCommandsComplex/expected/repo/myfile3 b/test/integration/customCommandsComplex/expected/repo/myfile3 deleted file mode 100644 index df6b0d2bc..000000000 --- a/test/integration/customCommandsComplex/expected/repo/myfile3 +++ /dev/null @@ -1 +0,0 @@ -test3 diff --git a/test/integration/customCommandsComplex/expected/repo/myfile4 b/test/integration/customCommandsComplex/expected/repo/myfile4 deleted file mode 100644 index d234c5e05..000000000 --- a/test/integration/customCommandsComplex/expected/repo/myfile4 +++ /dev/null @@ -1 +0,0 @@ -test4 diff --git a/test/integration/customCommandsComplex/expected/repo/output.txt b/test/integration/customCommandsComplex/expected/repo/output.txt deleted file mode 100644 index 7db446a08..000000000 --- a/test/integration/customCommandsComplex/expected/repo/output.txt +++ /dev/null @@ -1 +0,0 @@ -myfile2 Branch: #master haha true master diff --git a/test/integration/customCommandsComplex/recording.json b/test/integration/customCommandsComplex/recording.json deleted file mode 100644 index 8fdbd648c..000000000 --- a/test/integration/customCommandsComplex/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":623,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1369,"Mod":0,"Key":256,"Ch":78},{"Timestamp":1904,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2033,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2328,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2848,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3296,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3616,"Mod":0,"Key":127,"Ch":127},{"Timestamp":3824,"Mod":0,"Key":256,"Ch":104},{"Timestamp":3879,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3927,"Mod":0,"Key":256,"Ch":104},{"Timestamp":4000,"Mod":0,"Key":256,"Ch":97},{"Timestamp":4239,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4809,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5024,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5824,"Mod":0,"Key":260,"Ch":0},{"Timestamp":6079,"Mod":0,"Key":256,"Ch":32},{"Timestamp":6376,"Mod":0,"Key":256,"Ch":99},{"Timestamp":6591,"Mod":0,"Key":256,"Ch":116},{"Timestamp":6640,"Mod":0,"Key":256,"Ch":101},{"Timestamp":6816,"Mod":0,"Key":256,"Ch":115},{"Timestamp":6856,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7136,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7487,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":36}]} \ No newline at end of file diff --git a/test/integration/customCommandsComplex/setup.sh b/test/integration/customCommandsComplex/setup.sh deleted file mode 100644 index 0f364d18a..000000000 --- a/test/integration/customCommandsComplex/setup.sh +++ /dev/null @@ -1,23 +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 test2 > myfile2 -git add . -git commit -am "myfile2" -echo test3 > myfile3 -git add . -git commit -am "myfile3" -echo test4 > myfile4 -git add . -git commit -am "myfile4" diff --git a/test/integration/customCommandsComplex/test.json b/test/integration/customCommandsComplex/test.json deleted file mode 100644 index beac0e9ca..000000000 --- a/test/integration/customCommandsComplex/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "Invoke a custom command that creates a file, and then stage and commit that file. In this case we're using a more customised flow", - "speed": 5 -} diff --git a/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..76018072e --- /dev/null +++ b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +baz diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/FETCH_HEAD b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/FETCH_HEAD similarity index 100% rename from test/integration/customCommandsComplex/expected/repo/.git_keep/FETCH_HEAD rename to test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/FETCH_HEAD diff --git a/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/HEAD b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/HEAD new file mode 100644 index 000000000..0e5fcffdf --- /dev/null +++ b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/feature/foo diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/config b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/config similarity index 100% rename from test/integration/customCommandsComplex/expected/repo/.git_keep/config rename to test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/config diff --git a/test/integration/customCommandsComplex/expected/repo/.git_keep/description b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/description similarity index 100% rename from test/integration/customCommandsComplex/expected/repo/.git_keep/description rename to test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/description diff --git a/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/index b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/index new file mode 100644 index 0000000000000000000000000000000000000000..65d675154f23ffb2d0196e017d44a5e7017550f5 GIT binary patch literal 65 zcmZ?q402{*U|<4bhL9jvS0E+HV4z^Y<=qr}%;|LA&IJiiy? 1660476303 +1000 commit (initial): foo +d50975554a574b9c66e109927fdb4edfb6bbadb3 af550d3777f20bf024ad55c9c796e7e85ef32ccb CI 1660476303 +1000 commit: bar +af550d3777f20bf024ad55c9c796e7e85ef32ccb 16919871d6b442beac07e1573c557ca433cff356 CI 1660476303 +1000 commit: baz +16919871d6b442beac07e1573c557ca433cff356 16919871d6b442beac07e1573c557ca433cff356 CI 1660476303 +1000 checkout: moving from master to feature/foo diff --git a/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/logs/refs/heads/feature/foo b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/logs/refs/heads/feature/foo new file mode 100644 index 000000000..5538ba67f --- /dev/null +++ b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/logs/refs/heads/feature/foo @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 16919871d6b442beac07e1573c557ca433cff356 CI 1660476303 +1000 branch: Created from HEAD diff --git a/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/logs/refs/heads/master b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..f9d13618c --- /dev/null +++ b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/logs/refs/heads/master @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 d50975554a574b9c66e109927fdb4edfb6bbadb3 CI 1660476303 +1000 commit (initial): foo +d50975554a574b9c66e109927fdb4edfb6bbadb3 af550d3777f20bf024ad55c9c796e7e85ef32ccb CI 1660476303 +1000 commit: bar +af550d3777f20bf024ad55c9c796e7e85ef32ccb 16919871d6b442beac07e1573c557ca433cff356 CI 1660476303 +1000 commit: baz diff --git a/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/16/919871d6b442beac07e1573c557ca433cff356 b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/16/919871d6b442beac07e1573c557ca433cff356 new file mode 100644 index 0000000000000000000000000000000000000000..7b0995a4d3539afe4d323f081e60996df0d9e9bb GIT binary patch literal 147 zcmV;E0Brww0gcW<3c@fDKvCB@MfQSBlgT6j5y4fDk(o?TFt(Hk;_2-X+PNd literal 0 HcmV?d00001 diff --git a/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 new file mode 100644 index 0000000000000000000000000000000000000000..adf64119a33d7621aeeaa505d30adb58afaa5559 GIT binary patch literal 15 Wcmb$2YUo7(=;OWxYePDFr#W|-}H0swQ=V`}K1+(_!?2QaodStv3` AbpQYW literal 0 HcmV?d00001 diff --git a/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/d5/0975554a574b9c66e109927fdb4edfb6bbadb3 b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/d5/0975554a574b9c66e109927fdb4edfb6bbadb3 new file mode 100644 index 000000000..a8654985c --- /dev/null +++ b/test/integration_new/custom_commands/menu_from_command/expected/repo/.git_keep/objects/d5/0975554a574b9c66e109927fdb4edfb6bbadb3 @@ -0,0 +1,3 @@ +xA +0@Q91)BW=F&`R"n?~