1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-03 00:57:52 +02:00

Improve and adapt commit persistence test-cases

This commit is contained in:
AzraelSec
2025-01-21 01:34:30 +01:00
committed by Stefan Haller
parent a32be7e9fa
commit 6065908b0d
4 changed files with 43 additions and 15 deletions

View File

@ -28,6 +28,8 @@ var PreserveCommitMessage = NewIntegrationTest(NewIntegrationTestArgs{
Type("second paragraph").
Cancel()
t.FileSystem().PathPresent(".git/LAZYGIT_PENDING_COMMIT")
t.Views().Files().
IsFocused().
Press(keys.Files.CommitChanges)
@ -35,6 +37,22 @@ var PreserveCommitMessage = NewIntegrationTest(NewIntegrationTestArgs{
t.ExpectPopup().CommitMessagePanel().
Content(Equals("my commit message")).
SwitchToDescription().
Content(Equals("first paragraph\n\nsecond paragraph"))
Content(Equals("first paragraph\n\nsecond paragraph")).
Clear().
SwitchToSummary().
Clear().
Cancel()
t.FileSystem().PathNotPresent(".git/LAZYGIT_PENDING_COMMIT")
t.Views().Files().
IsFocused().
Press(keys.Files.CommitChanges)
t.ExpectPopup().CommitMessagePanel().
Type("my new commit message").
Confirm()
t.FileSystem().PathNotPresent(".git/LAZYGIT_PENDING_COMMIT")
},
})