Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AbortAfterConflictWhenContinuing = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Continue applying patches with git am, and abort when the next patch conflicts too", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { setUpConflictingAm(shell, true, true) }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Shell().UpdateFileAndAdd("file", "resolved\n") t.GlobalPress(keys.Universal.CreateRebaseOptionsMenu) t.ExpectPopup().Menu(). Title(Equals("Applying patches")). Select(Contains("continue")). Confirm() t.ExpectPopup().Menu(). Title(Equals("Conflicts!")). Select(Contains("Abort applying patches")). Confirm() t.Views().Status().Content(Equals("repo → master")) t.Views().Commits(). Lines( Contains("conflicting change"), Contains("base"), ) }, })
View Source
var ContinueAfterResolvingConflicts = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Continue applying patches with git am after resolving the conflicts of one of them", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { setUpConflictingAm(shell, false, true) }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Status().Content(Equals("(applying patches) repo → master")) t.Views().Information().Content(Contains("Applying patches")) t.Views().Options().Content(Contains("View 'am' options: m")) t.Views().Files(). IsFocused(). Lines( Contains("UU").Contains("file"), ) t.Views().Commits(). Focus(). Lines( Contains("─── Pending patches"), Contains("pick").Contains("add file2"), Contains("pick").Contains("<-- CONFLICT --- change file").IsSelected(), Contains("─── Commits"), Contains("conflicting change"), Contains("base"), ). NavigateToLine(Contains("add file2")). Tap(func() { t.Views().Main().Content( Contains("Subject: [PATCH 2/2] add file2"). Contains("+two")) }). Press(keys.Universal.Remove). Tap(func() { t.ExpectToast(Equals("Disabled: This action is not allowed while applying patches")) }) t.Shell().UpdateFileAndAdd("file", "resolved\n") t.GlobalPress(keys.Universal.CreateRebaseOptionsMenu) t.ExpectPopup().Menu(). Title(Equals("Applying patches")). Lines( Contains("continue"), Contains("abort"), Contains("skip"), Contains("Cancel"), ). Select(Contains("continue")). Confirm() t.Views().Status().Content(Equals("repo → master")) t.Views().Commits(). Lines( Contains("add file2"), Contains("change file"), Contains("conflicting change"), Contains("base"), ) }, })
View Source
var ContinueWithoutResolving = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Continue applying patches with git am after a patch didn't apply, without doing anything about it", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { setUpConflictingAm(shell, false, false) }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Status().Content(Equals("(applying patches) repo → master")) t.Views().Files().IsEmpty() t.GlobalPress(keys.Universal.CreateRebaseOptionsMenu) t.ExpectPopup().Menu(). Title(Equals("Applying patches")). Select(Contains("continue")). Confirm() t.ExpectPopup().Alert(). Title(Equals("Error")). Content(Contains("No changes - did you forget to use 'git add'?")). Confirm() t.Views().Status().Content(Equals("(applying patches) repo → master")) }, })
View Source
var LockErrorPartwayThroughSkip = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Skip a conflicting patch while another git process takes index.lock before git am applies the patch after the next one", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell. CreateFileAndAdd("file", "original\n"). Commit("base"). NewBranch("source"). UpdateFileAndAdd("file", "source\n"). Commit("change file"). CreateFileAndAdd("file2", "two\n"). Commit("add file2"). CreateFileAndAdd("file3", "three\n"). Commit("add file3"). RunShellCommand("git format-patch --stdout master..source > ../patches.mbox"). Checkout("master"). UpdateFileAndAdd("file", "master\n"). Commit("conflicting change"). RunCommandExpectError([]string{"git", "am", "--3way", "../patches.mbox"}) shared.HoldIndexLockAfterNextAppliedPatch(shell) }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.GlobalPress(keys.Universal.CreateRebaseOptionsMenu) t.ExpectPopup().Menu(). Title(Equals("Applying patches")). Select(Contains("skip")). Confirm() t.ExpectPopup().Alert(). Title(Equals("Error")). Content(Contains("index.lock': File exists.")). Confirm() t.Views().Status().Content(Equals("(applying patches) repo → master")) }, })
View Source
var SkipConflictingPatch = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Skip a patch that conflicts while applying patches with git am", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { setUpConflictingAm(shell, false, true) }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Status().Content(Equals("(applying patches) repo → master")) t.GlobalPress(keys.Universal.CreateRebaseOptionsMenu) t.ExpectPopup().Menu(). Title(Equals("Applying patches")). Select(Contains("skip")). Confirm() t.Views().Status().Content(Equals("repo → master")) t.Views().Commits(). Lines( Contains("add file2"), Contains("conflicting change"), Contains("base"), ) }, })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.