mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-23 21:51:07 +02:00
migrate switch tab from menu test
This commit is contained in:
parent
56424eb1aa
commit
6ee20840b2
@ -22,6 +22,7 @@ import (
|
|||||||
"github.com/jesseduffield/lazygit/pkg/integration/tests/sync"
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/sync"
|
||||||
"github.com/jesseduffield/lazygit/pkg/integration/tests/tag"
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/tag"
|
||||||
"github.com/jesseduffield/lazygit/pkg/integration/tests/undo"
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/undo"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/integration/tests/ui"
|
||||||
)
|
)
|
||||||
|
|
||||||
var tests = []*components.IntegrationTest{
|
var tests = []*components.IntegrationTest{
|
||||||
@ -101,4 +102,5 @@ var tests = []*components.IntegrationTest{
|
|||||||
tag.Reset,
|
tag.Reset,
|
||||||
undo.UndoCheckoutAndDrop,
|
undo.UndoCheckoutAndDrop,
|
||||||
undo.UndoDrop,
|
undo.UndoDrop,
|
||||||
|
ui.SwitchTabFromMenu,
|
||||||
}
|
}
|
||||||
|
27
pkg/integration/tests/ui/switch_tab_from_menu.go
Normal file
27
pkg/integration/tests/ui/switch_tab_from_menu.go
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package ui
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var SwitchTabFromMenu = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Switch tab via the options menu",
|
||||||
|
ExtraCmdArgs: "",
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
|
config.UserConfig.Git.AutoFetch = false
|
||||||
|
},
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
t.Views().Files().IsFocused().
|
||||||
|
Press(keys.Universal.OptionMenuAlt1)
|
||||||
|
|
||||||
|
t.ExpectPopup().Menu().Title(Equals("Menu")).
|
||||||
|
Select(Contains("next tab")).
|
||||||
|
Confirm()
|
||||||
|
|
||||||
|
t.Views().Submodules().IsFocused()
|
||||||
|
},
|
||||||
|
})
|
@ -1 +0,0 @@
|
|||||||
file0
|
|
@ -1 +0,0 @@
|
|||||||
72068e9a852a790a9b867e8b5d21cb4ede3ba4d7
|
|
@ -1,8 +0,0 @@
|
|||||||
[core]
|
|
||||||
repositoryformatversion = 0
|
|
||||||
filemode = true
|
|
||||||
bare = false
|
|
||||||
logallrefupdates = true
|
|
||||||
[user]
|
|
||||||
email = CI@example.com
|
|
||||||
name = CI
|
|
@ -1 +0,0 @@
|
|||||||
Unnamed repository; edit this file 'description' to name the repository.
|
|
Binary file not shown.
@ -1,6 +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]
|
|
||||||
# *~
|
|
@ -1,3 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 e0aeb3ba0b32392aaf7d88a5190aca76be967225 CI <CI@example.com> 1623779969 +0200 commit (initial): file0
|
|
||||||
e0aeb3ba0b32392aaf7d88a5190aca76be967225 72068e9a852a790a9b867e8b5d21cb4ede3ba4d7 CI <CI@example.com> 1623779969 +0200 commit: file0
|
|
||||||
72068e9a852a790a9b867e8b5d21cb4ede3ba4d7 72068e9a852a790a9b867e8b5d21cb4ede3ba4d7 CI <CI@example.com> 1623779976 +0200 checkout: moving from master to 0.0.2
|
|
@ -1,2 +0,0 @@
|
|||||||
0000000000000000000000000000000000000000 e0aeb3ba0b32392aaf7d88a5190aca76be967225 CI <CI@example.com> 1623779969 +0200 commit (initial): file0
|
|
||||||
e0aeb3ba0b32392aaf7d88a5190aca76be967225 72068e9a852a790a9b867e8b5d21cb4ede3ba4d7 CI <CI@example.com> 1623779969 +0200 commit: file0
|
|
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
xЌЋK
|
|
||||||
В0@]зЩ’L>“Ў«c’N°Р�R"x|{7oсx‹WzkлР–а2]|pѕ›ЅНXRЁѕтвcА”,t%µу!пЎЕ°d—ЩdЋЂ№в’K†cМB‚вПxхCOіѕOуSѕЬцMnҐ·‡¶"Q$}5`Њ:н95дП\ХuЈ~P49c
|
|
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
xЌНA
|
|
||||||
В0@QЧ9ЕмЙ$УLD„®zЊfњ`Ў!ҐDршцn?ѕ¶ZЧHtй‡xбДщi$!b“HPEНCVJжв–O·¦оУьґпRчНnЪк0…И,’®>xпОzNєэЙ]Y7у+t
|
|
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
72068e9a852a790a9b867e8b5d21cb4ede3ba4d7
|
|
@ -1 +0,0 @@
|
|||||||
e0aeb3ba0b32392aaf7d88a5190aca76be967225
|
|
@ -1 +0,0 @@
|
|||||||
72068e9a852a790a9b867e8b5d21cb4ede3ba4d7
|
|
@ -1 +0,0 @@
|
|||||||
{"KeyEvents":[{"Timestamp":1446,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1701,"Mod":0,"Key":256,"Ch":120},{"Timestamp":2661,"Mod":0,"Key":256,"Ch":47},{"Timestamp":3149,"Mod":0,"Key":256,"Ch":112},{"Timestamp":3301,"Mod":0,"Key":256,"Ch":114},{"Timestamp":3349,"Mod":0,"Key":256,"Ch":101},{"Timestamp":3509,"Mod":0,"Key":256,"Ch":118},{"Timestamp":3573,"Mod":0,"Key":256,"Ch":105},{"Timestamp":3653,"Mod":0,"Key":256,"Ch":111},{"Timestamp":3757,"Mod":0,"Key":256,"Ch":117},{"Timestamp":3837,"Mod":0,"Key":256,"Ch":115},{"Timestamp":4013,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4157,"Mod":0,"Key":256,"Ch":116},{"Timestamp":4213,"Mod":0,"Key":256,"Ch":97},{"Timestamp":4268,"Mod":0,"Key":256,"Ch":98},{"Timestamp":4533,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5140,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5860,"Mod":0,"Key":258,"Ch":0},{"Timestamp":6157,"Mod":0,"Key":256,"Ch":32},{"Timestamp":6701,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":79}]}
|
|
@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cd $1
|
|
||||||
|
|
||||||
git init
|
|
||||||
|
|
||||||
git config user.email "CI@example.com"
|
|
||||||
git config user.name "CI"
|
|
||||||
|
|
||||||
touch file0
|
|
||||||
git add file0
|
|
||||||
git commit -am file0
|
|
||||||
git tag 0.0.1
|
|
||||||
|
|
||||||
touch file1
|
|
||||||
git add file1
|
|
||||||
git commit -am file0
|
|
||||||
git tag 0.0.2
|
|
@ -1 +0,0 @@
|
|||||||
{ "description": "Change tabs from Options menu", "speed": 1 }
|
|
Loading…
x
Reference in New Issue
Block a user