Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Rename = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Try to rename the stash.", ExtraCmdArgs: "", Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell. EmptyCommit("blah"). CreateFileAndAdd("file-1", "change to stash1"). StashWithMessage("foo"). CreateFileAndAdd("file-2", "change to stash2"). StashWithMessage("bar") }, Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { input.SwitchToStashWindow() assert.CurrentViewName("stash") assert.MatchSelectedLine(Equals("On master: bar")) input.NextItem() assert.MatchSelectedLine(Equals("On master: foo")) input.PressKeys(keys.Stash.RenameStash) assert.InPrompt() assert.MatchCurrentViewTitle(Equals("Rename stash: stash@{1}")) input.Type(" baz") input.Confirm() assert.MatchSelectedLine(Equals("On master: foo baz")) }, })
View Source
var Stash = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Stashing files", ExtraCmdArgs: "", Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell.EmptyCommit("initial commit") shell.CreateFile("file", "content") shell.GitAddAll() }, Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { assert.StashCount(0) assert.WorkingTreeFileCount(1) input.PressKeys(keys.Files.ViewStashOptions) assert.InMenu() input.PressKeys("a") assert.InPrompt() assert.MatchCurrentViewTitle(Equals("Stash changes")) input.Type("my stashed file") input.Confirm() assert.StashCount(1) assert.WorkingTreeFileCount(0) }, })
View Source
var StashIncludingUntrackedFiles = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Stashing all files including untracked ones", ExtraCmdArgs: "", Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell.EmptyCommit("initial commit") shell.CreateFile("file_1", "content") shell.CreateFile("file_2", "content") shell.GitAdd("file_1") }, Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { assert.StashCount(0) assert.WorkingTreeFileCount(2) input.PressKeys(keys.Files.ViewStashOptions) assert.InMenu() input.PressKeys("U") assert.InPrompt() assert.MatchCurrentViewTitle(Equals("Stash changes")) input.Type("my stashed file") input.Confirm() assert.StashCount(1) assert.WorkingTreeFileCount(0) }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.