From ec92d92bf4de32679870b7ce6e0652f0aec1f332 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 12 Dec 2024 11:22:08 +0100 Subject: [PATCH] Extend commitPrefix test to cancel without changing the commmit message The test shows that we lose a space when cancelling and committing again. --- pkg/integration/tests/commit/commit_with_prefix.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg/integration/tests/commit/commit_with_prefix.go b/pkg/integration/tests/commit/commit_with_prefix.go index e83290bda..610b6aad9 100644 --- a/pkg/integration/tests/commit/commit_with_prefix.go +++ b/pkg/integration/tests/commit/commit_with_prefix.go @@ -33,7 +33,20 @@ var CommitWithPrefix = NewIntegrationTest(NewIntegrationTestArgs{ t.ExpectPopup().CommitMessagePanel(). Title(Equals("Commit summary")). InitialText(Equals("[TEST-001]: ")). + Cancel() + + t.Views().Files(). + IsFocused(). + Press(keys.Files.CommitChanges) + + t.ExpectPopup().CommitMessagePanel(). + Title(Equals("Commit summary")). + /* EXPECTED: + InitialText(Equals("[TEST-001]: ")). Type("my commit message"). + ACTUAL: */ + InitialText(Equals("[TEST-001]:")). + Type(" my commit message"). Cancel() t.Views().Files().