1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-22 00:17:37 +02:00

Check for skipping pre-commit hooks in more situations

This commit is contained in:
Luka Markušić
2024-04-24 20:37:08 +02:00
parent 4ec41c4414
commit d8cffa314e
2 changed files with 39 additions and 17 deletions

View File

@@ -57,24 +57,15 @@ var CommitSkipHook = NewIntegrationTest(NewIntegrationTestArgs{
t.Views().Commits().Focus().Press(keys.Commits.RenameCommit)
t.ExpectPopup().CommitMessagePanel().Type(" (reworded)").Confirm()
/* EXPECTED:
t.Views().Commits().IsFocused().
Lines(
Contains("skip! my commit message (reworded)"),
Contains("initial commit"),
)
ACTUAL:
*/
t.ExpectPopup().Alert().Title(Equals("Error")).Content(Contains("exit status 1")).Confirm()
t.Views().Commits().IsFocused().
Lines(
Contains("skip! my commit message (reworded)"),
Contains("initial commit"),
)
// we should be able to skip hooks when changing authors
t.Views().Commits().IsFocused().SelectedLine(Contains("CI").IsSelected())
t.Views().Commits().IsFocused().SelectedLine(Contains("JS").IsSelected())
t.Views().Commits().Focus().Press(keys.Commits.ResetCommitAuthor)
/* EXPECTED:
t.Views().Commits().IsFocused().Lines(Contains("JS").IsSelected())
ACTUAL:
*/
t.ExpectPopup().Alert().Title(Equals("Error")).Content(Contains("exit status 1")).Confirm()
t.Views().Commits().IsFocused().Lines(Contains("JS").IsSelected())
},
})