Skip to content

Commit 7f5465a

Browse files
committed
fix flaky tests
1 parent 275ed12 commit 7f5465a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

pkg/integration/tests/conflicts/undo_choose_hunk.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ var UndoChooseHunk = NewIntegrationTest(NewIntegrationTestArgs{
2525
t.Views().MergeConflicts().
2626
IsFocused().
2727
Content(Contains("<<<<<<< HEAD\nFirst Change")).
28+
// explicitly asserting on the selection because sometimes the content renders
29+
// before the selection is ready for user input
30+
SelectedLines(
31+
Contains("<<<<<<< HEAD"),
32+
Contains("First Change"),
33+
Contains("======="),
34+
).
2835
PressPrimaryAction().
2936
// choosing the first hunk
3037
Content(DoesNotContain("<<<<<<< HEAD\nFirst Change")).

pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ var ApplyInReverseWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
3939
).
4040
// Add both files to the patch; the first will conflict, the second won't
4141
PressPrimaryAction().
42+
Tap(func() {
43+
t.Views().Information().Content(Contains("building patch"))
44+
45+
t.Views().PatchBuildingSecondary().Content(
46+
Contains("+more file1 content"))
47+
}).
4248
SelectNextItem().
4349
PressPrimaryAction()
4450

45-
t.Views().Information().Content(Contains("building patch"))
46-
4751
t.Views().PatchBuildingSecondary().Content(
4852
Contains("+more file1 content").Contains("+more file2 content"))
4953

0 commit comments

Comments
 (0)