MCPcopy
hub / github.com/jesseduffield/lazygit / doTheRebaseForAmendTests

Function doTheRebaseForAmendTests

pkg/integration/tests/commit/shared.go:23–68  ·  view source on GitHub ↗
(t *TestDriver, keys config.KeybindingConfig)

Source from the content-addressed store, hash-verified

21}
22
23func doTheRebaseForAmendTests(t *TestDriver, keys config.KeybindingConfig) {
24 t.Views().Commits().
25 Focus().
26 Lines(
27 Contains("commit three").IsSelected(),
28 Contains("file1 changed in branch"),
29 Contains("commit two"),
30 Contains("base commit"),
31 )
32 t.Views().Branches().
33 Focus().
34 NavigateToLine(Contains("master")).
35 Press(keys.Branches.RebaseBranch).
36 Tap(func() {
37 t.ExpectPopup().Menu().
38 Title(Equals("Rebase 'branch'")).
39 Select(Contains("Simple rebase")).
40 Confirm()
41 t.Common().AcknowledgeConflicts()
42 })
43
44 t.Views().Commits().
45 Lines(
46 Contains("--- Pending rebase todos ---"),
47 Contains("pick").Contains("commit three"),
48 Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"),
49 Contains("--- Commits ---"),
50 Contains("commit two"),
51 Contains("file1 changed in master"),
52 Contains("base commit"),
53 )
54
55 t.Views().Files().
56 Focus().
57 PressEnter()
58
59 t.Views().MergeConflicts().
60 IsFocused().
61 SelectNextItem(). // choose "incoming"
62 PressPrimaryAction()
63
64 t.ExpectPopup().Confirmation().
65 Title(Equals("Continue")).
66 Content(Contains("All merge conflicts resolved. Continue the rebase?")).
67 Cancel()
68}
69
70func checkCommitContainsChange(t *TestDriver, commitSubject string, change string) {
71 t.Views().Commits().

Calls 15

ContainsFunction · 0.85
EqualsFunction · 0.85
FocusMethod · 0.80
CommitsMethod · 0.80
IsSelectedMethod · 0.80
PressMethod · 0.80
NavigateToLineMethod · 0.80
SelectMethod · 0.80
ExpectPopupMethod · 0.80
AcknowledgeConflictsMethod · 0.80
CommonMethod · 0.80
ContainsMethod · 0.80

Tested by

no test coverage detected