mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-05 23:50:39 +03:00
=== Do not change lines below ===
{
"chain": [],
"cmd": "codespell -w",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
Signed-off-by: Yaroslav Halchenko <debian@onerussian.com>
29 lines
890 B
Go
29 lines
890 B
Go
package misc
|
|
|
|
import (
|
|
"github.com/jesseduffield/lazygit/pkg/config"
|
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
|
)
|
|
|
|
// Couldn't find an easy way to actually reproduce the situation of opening outside a repo,
|
|
// so I'm introducing a hacky env var to force lazygit to show the recent repos menu upon opening.
|
|
|
|
var RecentReposOnLaunch = NewIntegrationTest(NewIntegrationTestArgs{
|
|
Description: "When opening to a menu, focus is correctly given to the menu",
|
|
ExtraCmdArgs: []string{},
|
|
ExtraEnvVars: map[string]string{
|
|
"SHOW_RECENT_REPOS": "true",
|
|
},
|
|
Skip: false,
|
|
SetupConfig: func(config *config.AppConfig) {},
|
|
SetupRepo: func(shell *Shell) {},
|
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
|
t.ExpectPopup().Menu().
|
|
Title(Equals("Recent repositories")).
|
|
Select(Contains("Cancel")).
|
|
Confirm()
|
|
|
|
t.Views().Files().IsFocused()
|
|
},
|
|
})
|