1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-21 21:47:32 +02:00

migrate switch tab from menu test

This commit is contained in:
Jesse Duffield 2023-02-19 13:29:04 +11:00
parent 56424eb1aa
commit 6ee20840b2
24 changed files with 29 additions and 51 deletions

@ -22,6 +22,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/integration/tests/sync"
"github.com/jesseduffield/lazygit/pkg/integration/tests/tag"
"github.com/jesseduffield/lazygit/pkg/integration/tests/undo"
"github.com/jesseduffield/lazygit/pkg/integration/tests/ui"
)
var tests = []*components.IntegrationTest{
@ -101,4 +102,5 @@ var tests = []*components.IntegrationTest{
tag.Reset,
undo.UndoCheckoutAndDrop,
undo.UndoDrop,
ui.SwitchTabFromMenu,
}

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

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

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

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

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