mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 23:56:24 -04:00
Add selection assertions to tests involving conflicts
This doesn't change anything, we just pin down the selection behavior around conflicts; we are going to change that behavior, and these tests will make it obvious how when they change in the next commit.
This commit is contained in:
parent
aa38daff98
commit
6417da5319
|
|
@ -30,7 +30,7 @@ var AmendWhenThereAreConflictsAndAmend = NewIntegrationTest(NewIntegrationTestAr
|
|||
Focus().
|
||||
Lines(
|
||||
Contains("─── Pending rebase todos"),
|
||||
Contains("pick").Contains("commit three"),
|
||||
Contains("pick").Contains("commit three").IsSelected(),
|
||||
Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"),
|
||||
Contains("─── Commits"),
|
||||
Contains("commit two"),
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ var AmendWhenThereAreConflictsAndCancel = NewIntegrationTest(NewIntegrationTestA
|
|||
Focus().
|
||||
Lines(
|
||||
Contains("─── Pending rebase todos"),
|
||||
Contains("pick").Contains("commit three"),
|
||||
Contains("pick").Contains("commit three").IsSelected(),
|
||||
Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"),
|
||||
Contains("─── Commits"),
|
||||
Contains("commit two"),
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ var RevertWithConflictMultipleCommits = NewIntegrationTest(NewIntegrationTestArg
|
|||
Contains("revert").Contains("CI <-- CONFLICT --- add first line"),
|
||||
Contains("─── Commits"),
|
||||
Contains("CI ○ add second line"),
|
||||
Contains("CI ○ add first line"),
|
||||
Contains("CI ○ unrelated change"),
|
||||
Contains("CI ○ add first line").IsSelected(),
|
||||
Contains("CI ○ unrelated change").IsSelected(),
|
||||
Contains("CI ○ add empty file"),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ var RevertWithConflictSingleCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
Contains("revert").Contains("CI <-- CONFLICT --- add first line"),
|
||||
Contains("─── Commits"),
|
||||
Contains("CI ○ add second line"),
|
||||
Contains("CI ○ add first line"),
|
||||
Contains("CI ○ add first line").IsSelected(),
|
||||
Contains("CI ○ add empty file"),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ func doTheRebaseForAmendTests(t *TestDriver, keys config.KeybindingConfig) {
|
|||
t.Views().Commits().
|
||||
Lines(
|
||||
Contains("─── Pending rebase todos"),
|
||||
Contains("pick").Contains("commit three"),
|
||||
Contains("pick").Contains("commit three").IsSelected(),
|
||||
Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"),
|
||||
Contains("─── Commits"),
|
||||
Contains("commit two"),
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ var AmendCommitWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
Contains("pick").Contains("three"),
|
||||
Contains("fixup").Contains("<-- CONFLICT --- fixup! two"),
|
||||
Contains("─── Commits"),
|
||||
Contains("two"),
|
||||
Contains("two").IsSelected(),
|
||||
Contains("one"),
|
||||
)
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ var AmendCommitWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
Contains("<-- CONFLICT --- three"),
|
||||
Contains("─── Commits"),
|
||||
Contains("two"),
|
||||
Contains("one"),
|
||||
Contains("one").IsSelected(),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ var EditTheConflCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
Focus().
|
||||
Lines(
|
||||
Contains("─── Pending rebase todos"),
|
||||
Contains("pick").Contains("commit two"),
|
||||
Contains("pick").Contains("commit two").IsSelected(),
|
||||
Contains("pick").Contains("<-- CONFLICT --- commit three"),
|
||||
Contains("─── Commits"),
|
||||
Contains("commit one"),
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ var RevertMultipleCommitsInInteractiveRebase = NewIntegrationTest(NewIntegration
|
|||
Contains("revert").Contains("CI <-- CONFLICT --- add first line"),
|
||||
Contains("─── Commits"),
|
||||
Contains("CI ○ add second line"),
|
||||
Contains("CI ○ add first line"),
|
||||
Contains("CI ○ unrelated change 1"),
|
||||
Contains("CI ○ add first line").IsSelected(),
|
||||
Contains("CI ○ unrelated change 1").IsSelected(),
|
||||
Contains("CI ○ add empty file"),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ func handleConflictsFromSwap(t *TestDriver, expectedCommand string) {
|
|||
t.Views().Commits().
|
||||
Lines(
|
||||
Contains("─── Pending rebase todos"),
|
||||
Contains("pick").Contains("commit two"),
|
||||
Contains("pick").Contains("commit two").IsSelected(),
|
||||
Contains(expectedCommand).Contains("<-- CONFLICT --- commit three"),
|
||||
Contains("─── Commits"),
|
||||
Contains("commit one"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue