mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-22 05:29:44 +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().
|
t.Views().Files().
|
||||||
IsFocused().
|
IsFocused().
|
||||||
|
Lines(
|
||||||
|
Contains("?? myfile").IsSelected(),
|
||||||
|
Contains("?? myfile2"),
|
||||||
|
).
|
||||||
PressPrimaryAction(). // stage file
|
PressPrimaryAction(). // stage file
|
||||||
|
Lines(
|
||||||
|
Contains("A myfile").IsSelected(),
|
||||||
|
Contains("?? myfile2"),
|
||||||
|
).
|
||||||
SelectNextItem().
|
SelectNextItem().
|
||||||
PressPrimaryAction(). // stage other file
|
PressPrimaryAction(). // stage other file
|
||||||
|
Lines(
|
||||||
|
Contains("A myfile"),
|
||||||
|
Contains("A myfile2").IsSelected(),
|
||||||
|
).
|
||||||
Press(keys.Files.CommitChanges)
|
Press(keys.Files.CommitChanges)
|
||||||
|
|
||||||
commitMessage := "my commit message"
|
commitMessage := "my commit message"
|
||||||
|
|
||||||
t.ExpectPopup().CommitMessagePanel().Type(commitMessage).Confirm()
|
t.ExpectPopup().CommitMessagePanel().Type(commitMessage).Confirm()
|
||||||
|
|
||||||
|
t.Views().Files().
|
||||||
|
IsEmpty()
|
||||||
|
|
||||||
t.Views().Commits().
|
t.Views().Commits().
|
||||||
|
Focus().
|
||||||
Lines(
|
Lines(
|
||||||
Contains(commitMessage),
|
Contains(commitMessage).IsSelected(),
|
||||||
|
).
|
||||||
|
PressEnter()
|
||||||
|
|
||||||
|
t.Views().CommitFiles().
|
||||||
|
IsFocused().
|
||||||
|
Lines(
|
||||||
|
Contains("A myfile"),
|
||||||
|
Contains("A myfile2"),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user