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.UserConfig.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.UserConfig.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.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 InitialOpen = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Confirms a popup appears on first opening Lazygit", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) { config.UserConfig.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 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.