Skip to content

Commit 09a4e0b

Browse files
committed
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.
1 parent 6479c52 commit 09a4e0b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

pkg/integration/tests/cherry_pick/cherry_pick.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
7373
t.Views().Information().Content(DoesNotContain("commits copied"))
7474
}).
7575
Lines(
76-
Contains("four"),
76+
Contains("four").IsSelected(),
7777
Contains("three"),
7878
Contains("two"),
7979
Contains("one"),
@@ -102,7 +102,7 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{
102102
t.Views().Information().Content(DoesNotContain("commits copied"))
103103
}).
104104
Lines(
105-
Contains("four"),
105+
Contains("four").IsSelected(),
106106
Contains("three"),
107107
Contains("base"),
108108
)

pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
4343
t.Views().Commits().
4444
Focus().
4545
TopLines(
46-
Contains("first change"),
46+
Contains("first change").IsSelected(),
4747
).
4848
Press(keys.Commits.PasteCommits)
4949

@@ -76,7 +76,7 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{
7676
t.Views().Commits().
7777
Focus().
7878
TopLines(
79-
Contains("second-change-branch unrelated change"),
79+
Contains("second-change-branch unrelated change").IsSelected(),
8080
Contains("second change"),
8181
Contains("first change"),
8282
).

pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
7979
Contains("--- Pending rebase todos ---"),
8080
Contains("pick CI two"),
8181
Contains("--- Commits ---"),
82-
Contains(" CI three"),
82+
Contains(" CI three").IsSelected(),
8383
Contains(" CI one"),
8484
Contains(" CI base"),
8585
).
@@ -88,7 +88,7 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
8888
}).
8989
Lines(
9090
Contains("CI two"),
91-
Contains("CI three"),
91+
Contains("CI three").IsSelected(),
9292
Contains("CI one"),
9393
Contains("CI base"),
9494
)

pkg/integration/tests/cherry_pick/cherry_pick_range.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var CherryPickRange = NewIntegrationTest(NewIntegrationTestArgs{
7070
t.Views().Information().Content(DoesNotContain("commits copied"))
7171
}).
7272
Lines(
73-
Contains("four"),
73+
Contains("four").IsSelected(),
7474
Contains("three"),
7575
Contains("two"),
7676
Contains("one"),

0 commit comments

Comments
 (0)