Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Checkout = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Checkout a tag", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell.EmptyCommit("one") shell.EmptyCommit("two") shell.CreateLightweightTag("tag", "HEAD^") }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Tags(). Focus(). Lines( Contains("tag").IsSelected(), ). PressPrimaryAction() t.Views().Branches().IsFocused().Lines( Contains("HEAD detached at tag").IsSelected(), Contains("master"), ) }, })
View Source
var CreateWhileCommitting = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Draft a commit message, escape out, and make a tag. Verify the draft message doesn't appear in the tag create prompt", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell.EmptyCommit("initial commit") shell.CreateFileAndAdd("file.txt", "file contents") }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Files(). Press(keys.Files.CommitChanges). Tap(func() { t.ExpectPopup().CommitMessagePanel(). Title(Equals("Commit summary")). Type("draft message"). Cancel() }) t.Views().Tags(). Focus(). IsEmpty(). Press(keys.Universal.New). Tap(func() { t.ExpectPopup().CommitMessagePanel(). Title(Equals("Tag name")). InitialText(Equals("")) }) }, })
View Source
var CrudAnnotated = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Create and delete an annotated tag in the tags panel", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell.EmptyCommit("initial commit") }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Tags(). Focus(). IsEmpty(). Press(keys.Universal.New). Tap(func() { t.ExpectPopup().CommitMessagePanel(). Title(Equals("Tag name")). Type("new-tag"). SwitchToDescription(). Title(Equals("Tag description")). Type("message"). SwitchToSummary(). Confirm() }). Lines( MatchesRegexp(`new-tag.*message`).IsSelected(), ). Press(keys.Universal.Remove). Tap(func() { t.ExpectPopup().Confirmation(). Title(Equals("Delete tag")). Content(Equals("Are you sure you want to delete tag 'new-tag'?")). Confirm() }). IsEmpty(). Press(keys.Universal.New). Tap(func() { t.ExpectPopup().CommitMessagePanel(). Title(Equals("Tag name")). InitialText(Equals("")) }) }, })
View Source
var CrudLightweight = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Create and delete a lightweight tag in the tags panel", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell.EmptyCommit("initial commit") }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Tags(). Focus(). IsEmpty(). Press(keys.Universal.New). Tap(func() { t.ExpectPopup().CommitMessagePanel(). Title(Equals("Tag name")). Type("new-tag"). Confirm() }). Lines( MatchesRegexp(`new-tag.*initial commit`).IsSelected(), ). PressEnter(). Tap(func() { t.Views().SubCommits().IsFocused(). Lines( Contains("initial commit"), ). PressEscape() }). Press(keys.Universal.Remove). Tap(func() { t.ExpectPopup().Confirmation(). Title(Equals("Delete tag")). Content(Equals("Are you sure you want to delete tag 'new-tag'?")). Confirm() }). IsEmpty() }, })
View Source
var Reset = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Hard reset to a tag", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell.EmptyCommit("one") shell.EmptyCommit("two") shell.CreateLightweightTag("tag", "HEAD^") }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Commits().Lines( Contains("two"), Contains("one"), ) t.Views().Tags(). Focus(). Lines( Contains("tag").IsSelected(), ). Press(keys.Commits.ViewResetOptions) t.ExpectPopup().Menu(). Title(Contains("Reset to tag")). Select(Contains("Hard reset")). Confirm() t.Views().Commits().Lines( Contains("one"), ) }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.