Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfirmOnQuit = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Quitting with a confirm prompt", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) { config.GetUserConfig().ConfirmOnQuit = true }, SetupRepo: func(shell *Shell) {}, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Files(). IsFocused(). Press(keys.Universal.Quit) t.ExpectPopup().Confirmation(). Title(Equals("")). Content(Contains("Are you sure you want to quit?")). Confirm() }, })
View Source
var CopyToClipboard = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Copy a branch name to the clipboard using custom clipboard command template", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) { config.GetUserConfig().OS.CopyToClipboardCmd = "echo {{text}} > clipboard" }, SetupRepo: func(shell *Shell) { shell.NewBranch("branch-a") }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Branches(). Focus(). Lines( Contains("branch-a").IsSelected(), ). Press(keys.Universal.CopyToClipboard) t.ExpectToast(Equals("'branch-a' copied to clipboard")) t.Views().Files(). Focus() t.GlobalPress(keys.Files.RefreshFiles) t.Views().Files(). IsFocused(). Lines( Contains("clipboard").IsSelected(), ) t.Views().Main().Content(Contains("branch-a")) }, })
View Source
var DisabledKeybindings = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Confirms you can disable keybindings by setting them to <disabled>", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) { config.GetUserConfig().Keybinding.Universal.PrevItem = "<disabled>" config.GetUserConfig().Keybinding.Universal.NextItem = "<disabled>" config.GetUserConfig().Keybinding.Universal.NextTab = "<up>" config.GetUserConfig().Keybinding.Universal.PrevTab = "<down>" }, SetupRepo: func(shell *Shell) {}, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Files(). IsFocused(). Press("<up>") t.Views().Worktrees().IsFocused() }, })
View Source
var InitialOpen = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Confirms a popup appears on first opening Lazygit", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) { config.GetUserConfig().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() }, })
View Source
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() }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.