1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-02 16:02:33 +03:00

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.
This commit is contained in:
Stefan Haller
2025-11-27 10:59:15 +01:00
parent 28cd1c2df4
commit c16b4b1d2e
2 changed files with 8 additions and 6 deletions

View File

@@ -36,9 +36,9 @@ var FindBaseCommitForFixup = NewIntegrationTest(NewIntegrationTestArgs{
t.ExpectPopup().Alert(). t.ExpectPopup().Alert().
Title(Equals("Error")). Title(Equals("Error")).
Content( Content(
Contains("Multiple base commits found"). MatchesRegexp("Multiple base commits found.*\n\n" +
Contains("2nd commit"). ".*2nd commit\n" +
Contains("3rd commit"), ".*3rd commit"),
). ).
Confirm() Confirm()

View File

@@ -39,9 +39,11 @@ var FindBaseCommitForFixupOnlyAddedLines = NewIntegrationTest(NewIntegrationTest
t.ExpectPopup().Alert(). t.ExpectPopup().Alert().
Title(Equals("Error")). Title(Equals("Error")).
Content( Content(
Contains("Multiple base commits found"). MatchesRegexp(
Contains("3rd commit"). "Multiple base commits found.*\n\n" +
Contains("4th commit"), ".*4th commit\n" +
".*3rd commit",
),
). ).
Confirm() Confirm()