From c16b4b1d2e9022069eaee7ebeeb0e41ece56ec2e Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 27 Nov 2025 10:59:15 +0100 Subject: [PATCH] Make find_base_commit_for_fixup tests more specific We want to test the order in which the commits are listed in the error message. For one of the tests the order is already as we want it, but for the other it's not (we want them to show up in log order). We'll fix this in the next commit. --- .../tests/commit/find_base_commit_for_fixup.go | 6 +++--- .../commit/find_base_commit_for_fixup_only_added_lines.go | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/integration/tests/commit/find_base_commit_for_fixup.go b/pkg/integration/tests/commit/find_base_commit_for_fixup.go index 4440932e9..22b6b4ed9 100644 --- a/pkg/integration/tests/commit/find_base_commit_for_fixup.go +++ b/pkg/integration/tests/commit/find_base_commit_for_fixup.go @@ -36,9 +36,9 @@ var FindBaseCommitForFixup = NewIntegrationTest(NewIntegrationTestArgs{ t.ExpectPopup().Alert(). Title(Equals("Error")). Content( - Contains("Multiple base commits found"). - Contains("2nd commit"). - Contains("3rd commit"), + MatchesRegexp("Multiple base commits found.*\n\n" + + ".*2nd commit\n" + + ".*3rd commit"), ). Confirm() diff --git a/pkg/integration/tests/commit/find_base_commit_for_fixup_only_added_lines.go b/pkg/integration/tests/commit/find_base_commit_for_fixup_only_added_lines.go index 281fe72f9..6b1c96150 100644 --- a/pkg/integration/tests/commit/find_base_commit_for_fixup_only_added_lines.go +++ b/pkg/integration/tests/commit/find_base_commit_for_fixup_only_added_lines.go @@ -39,9 +39,11 @@ var FindBaseCommitForFixupOnlyAddedLines = NewIntegrationTest(NewIntegrationTest t.ExpectPopup().Alert(). Title(Equals("Error")). Content( - Contains("Multiple base commits found"). - Contains("3rd commit"). - Contains("4th commit"), + MatchesRegexp( + "Multiple base commits found.*\n\n" + + ".*4th commit\n" + + ".*3rd commit", + ), ). Confirm()