mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
Add selection assertions to cherry-pick tests
We are about to change the selection behavior when cherry-picking, and it's good to have tests that document in what way it changes in the next commit.
This commit is contained in:
@ -73,7 +73,7 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
t.Views().Information().Content(DoesNotContain("commits copied"))
|
t.Views().Information().Content(DoesNotContain("commits copied"))
|
||||||
}).
|
}).
|
||||||
Lines(
|
Lines(
|
||||||
Contains("four"),
|
Contains("four").IsSelected(),
|
||||||
Contains("three"),
|
Contains("three"),
|
||||||
Contains("two"),
|
Contains("two"),
|
||||||
Contains("one"),
|
Contains("one"),
|
||||||
@ -102,7 +102,7 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
t.Views().Information().Content(DoesNotContain("commits copied"))
|
t.Views().Information().Content(DoesNotContain("commits copied"))
|
||||||
}).
|
}).
|
||||||
Lines(
|
Lines(
|
||||||
Contains("four"),
|
Contains("four").IsSelected(),
|
||||||
Contains("three"),
|
Contains("three"),
|
||||||
Contains("base"),
|
Contains("base"),
|
||||||
)
|
)
|
||||||
|
@ -43,7 +43,7 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
t.Views().Commits().
|
t.Views().Commits().
|
||||||
Focus().
|
Focus().
|
||||||
TopLines(
|
TopLines(
|
||||||
Contains("first change"),
|
Contains("first change").IsSelected(),
|
||||||
).
|
).
|
||||||
Press(keys.Commits.PasteCommits)
|
Press(keys.Commits.PasteCommits)
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
t.Views().Commits().
|
t.Views().Commits().
|
||||||
Focus().
|
Focus().
|
||||||
TopLines(
|
TopLines(
|
||||||
Contains("second-change-branch unrelated change"),
|
Contains("second-change-branch unrelated change").IsSelected(),
|
||||||
Contains("second change"),
|
Contains("second change"),
|
||||||
Contains("first change"),
|
Contains("first change"),
|
||||||
).
|
).
|
||||||
|
@ -79,7 +79,7 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Contains("--- Pending rebase todos ---"),
|
Contains("--- Pending rebase todos ---"),
|
||||||
Contains("pick CI two"),
|
Contains("pick CI two"),
|
||||||
Contains("--- Commits ---"),
|
Contains("--- Commits ---"),
|
||||||
Contains(" CI three"),
|
Contains(" CI three").IsSelected(),
|
||||||
Contains(" CI one"),
|
Contains(" CI one"),
|
||||||
Contains(" CI base"),
|
Contains(" CI base"),
|
||||||
).
|
).
|
||||||
@ -88,7 +88,7 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
}).
|
}).
|
||||||
Lines(
|
Lines(
|
||||||
Contains("CI two"),
|
Contains("CI two"),
|
||||||
Contains("CI three"),
|
Contains("CI three").IsSelected(),
|
||||||
Contains("CI one"),
|
Contains("CI one"),
|
||||||
Contains("CI base"),
|
Contains("CI base"),
|
||||||
)
|
)
|
||||||
|
@ -70,7 +70,7 @@ var CherryPickRange = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
t.Views().Information().Content(DoesNotContain("commits copied"))
|
t.Views().Information().Content(DoesNotContain("commits copied"))
|
||||||
}).
|
}).
|
||||||
Lines(
|
Lines(
|
||||||
Contains("four"),
|
Contains("four").IsSelected(),
|
||||||
Contains("three"),
|
Contains("three"),
|
||||||
Contains("two"),
|
Contains("two"),
|
||||||
Contains("one"),
|
Contains("one"),
|
||||||
|
Reference in New Issue
Block a user