mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-02 09:21:40 +02:00
create actions struct
This commit is contained in:
parent
a27092a7ad
commit
7aa843c75a
19
pkg/integration/components/actions.go
Normal file
19
pkg/integration/components/actions.go
Normal file
@ -0,0 +1,19 @@
|
||||
package components
|
||||
|
||||
// for running common actions
|
||||
type Actions struct {
|
||||
t *TestDriver
|
||||
}
|
||||
|
||||
func (self *Actions) ContinueMerge() {
|
||||
self.t.Views().current().Press(self.t.keys.Universal.CreateRebaseOptionsMenu)
|
||||
|
||||
self.t.ExpectMenu().
|
||||
Title(Equals("Rebase Options")).
|
||||
Select(Contains("continue")).
|
||||
Confirm()
|
||||
}
|
||||
|
||||
func (self *Actions) ContinueRebase() {
|
||||
self.ContinueMerge()
|
||||
}
|
@ -42,17 +42,8 @@ func (self *TestDriver) typeContent(content string) {
|
||||
}
|
||||
}
|
||||
|
||||
func (self *TestDriver) ContinueMerge() {
|
||||
self.Views().current().Press(self.keys.Universal.CreateRebaseOptionsMenu)
|
||||
|
||||
self.ExpectMenu().
|
||||
Title(Equals("Rebase Options")).
|
||||
Select(Contains("continue")).
|
||||
Confirm()
|
||||
}
|
||||
|
||||
func (self *TestDriver) ContinueRebase() {
|
||||
self.ContinueMerge()
|
||||
func (self *TestDriver) Actions() *Actions {
|
||||
return &Actions{t: self}
|
||||
}
|
||||
|
||||
// for when you want to allow lazygit to process something before continuing
|
||||
|
@ -61,7 +61,7 @@ var One = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Contains("commit 01"),
|
||||
).
|
||||
Tap(func() {
|
||||
t.ContinueRebase()
|
||||
t.Actions().ContinueRebase()
|
||||
}).
|
||||
Lines(
|
||||
Contains("commit 02"),
|
||||
|
Loading…
Reference in New Issue
Block a user