summaryrefslogtreecommitdiffstats
path: root/pkg/integration
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-04-14 20:50:13 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-04-14 21:01:45 +1000
commit7f5465a27bb52b9e17df35612bcaaf765de29a55 (patch)
tree318325fdb3254e103e90d8459c3830848fa8a209 /pkg/integration
parent275ed1248657b85d40a77683db42e013295d64cf (diff)
fix flaky tests
Diffstat (limited to 'pkg/integration')
-rw-r--r--pkg/integration/tests/conflicts/undo_choose_hunk.go7
-rw-r--r--pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go8
2 files changed, 13 insertions, 2 deletions
diff --git a/pkg/integration/tests/conflicts/undo_choose_hunk.go b/pkg/integration/tests/conflicts/undo_choose_hunk.go
index 0f2575304..b008ed762 100644
--- a/pkg/integration/tests/conflicts/undo_choose_hunk.go
+++ b/pkg/integration/tests/conflicts/undo_choose_hunk.go
@@ -25,6 +25,13 @@ var UndoChooseHunk = NewIntegrationTest(NewIntegrationTestArgs{
t.Views().MergeConflicts().
IsFocused().
Content(Contains("<<<<<<< HEAD\nFirst Change")).
+ // explicitly asserting on the selection because sometimes the content renders
+ // before the selection is ready for user input
+ SelectedLines(
+ Contains("<<<<<<< HEAD"),
+ Contains("First Change"),
+ Contains("======="),
+ ).
PressPrimaryAction().
// choosing the first hunk
Content(DoesNotContain("<<<<<<< HEAD\nFirst Change")).
diff --git a/pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go b/pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go
index 04d160a01..04373622c 100644
--- a/pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go
+++ b/pkg/integration/tests/patch_building/apply_in_reverse_with_conflict.go
@@ -39,11 +39,15 @@ var ApplyInReverseWithConflict = NewIntegrationTest(NewIntegrationTestArgs{
).
// Add both files to the patch; the first will conflict, the second won't
PressPrimaryAction().
+ Tap(func() {
+ t.Views().Information().Content(Contains("building patch"))
+
+ t.Views().PatchBuildingSecondary().Content(
+ Contains("+more file1 content"))
+ }).
SelectNextItem().
PressPrimaryAction()
- t.Views().Information().Content(Contains("building patch"))
-
t.Views().PatchBuildingSecondary().Content(
Contains("+more file1 content").Contains("+more file2 content"))