From a9ae5063c2e6dd7d0dd3f0e6617c4abadd08fe92 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 3 Jun 2023 15:50:20 +1000 Subject: [PATCH] Fix flakey test Whenever we perform an action in a test, we should assert on the result before doing the next action. This prevents issues where the test moves too fast for our code. It would be nice to not have to do this, but for now that's the situation --- pkg/integration/tests/reflog/patch.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/integration/tests/reflog/patch.go b/pkg/integration/tests/reflog/patch.go index 7cbdcba83..415fb18ee 100644 --- a/pkg/integration/tests/reflog/patch.go +++ b/pkg/integration/tests/reflog/patch.go @@ -28,6 +28,12 @@ var Patch = NewIntegrationTest(NewIntegrationTestArgs{ Contains("commit (initial): one"), ). SelectNextItem(). + Lines( + Contains("reset: moving to HEAD^^"), + Contains("commit: three").IsSelected(), + Contains("commit: two"), + Contains("commit (initial): one"), + ). PressEnter() t.Views().SubCommits().