mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-04 03:48:07 +02:00
improved commit test
This commit is contained in:
parent
ac580ae6a0
commit
9e2a3a87dd
@ -20,18 +20,42 @@ var Commit = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
|
||||
t.Views().Files().
|
||||
IsFocused().
|
||||
Lines(
|
||||
Contains("?? myfile").IsSelected(),
|
||||
Contains("?? myfile2"),
|
||||
).
|
||||
PressPrimaryAction(). // stage file
|
||||
Lines(
|
||||
Contains("A myfile").IsSelected(),
|
||||
Contains("?? myfile2"),
|
||||
).
|
||||
SelectNextItem().
|
||||
PressPrimaryAction(). // stage other file
|
||||
Lines(
|
||||
Contains("A myfile"),
|
||||
Contains("A myfile2").IsSelected(),
|
||||
).
|
||||
Press(keys.Files.CommitChanges)
|
||||
|
||||
commitMessage := "my commit message"
|
||||
|
||||
t.ExpectPopup().CommitMessagePanel().Type(commitMessage).Confirm()
|
||||
|
||||
t.Views().Files().
|
||||
IsEmpty()
|
||||
|
||||
t.Views().Commits().
|
||||
Focus().
|
||||
Lines(
|
||||
Contains(commitMessage),
|
||||
Contains(commitMessage).IsSelected(),
|
||||
).
|
||||
PressEnter()
|
||||
|
||||
t.Views().CommitFiles().
|
||||
IsFocused().
|
||||
Lines(
|
||||
Contains("A myfile"),
|
||||
Contains("A myfile2"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user