mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-12 11:15:00 +02:00
47 lines
1.2 KiB
Go
47 lines
1.2 KiB
Go
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.ExpectPopup().Menu().
|
|
Title(Equals("Rebase Options")).
|
|
Select(Contains("continue")).
|
|
Confirm()
|
|
}
|
|
|
|
func (self *Actions) ContinueRebase() {
|
|
self.ContinueMerge()
|
|
}
|
|
|
|
func (self *Actions) AcknowledgeConflicts() {
|
|
self.t.ExpectPopup().Confirmation().
|
|
Title(Equals("Auto-merge failed")).
|
|
Content(Contains("Conflicts!")).
|
|
Confirm()
|
|
}
|
|
|
|
func (self *Actions) ContinueOnConflictsResolved() {
|
|
self.t.ExpectPopup().Confirmation().
|
|
Title(Equals("continue")).
|
|
Content(Contains("all merge conflicts resolved. Continue?")).
|
|
Confirm()
|
|
}
|
|
|
|
func (self *Actions) ConfirmDiscardLines() {
|
|
self.t.ExpectPopup().Confirmation().
|
|
Title(Equals("Unstage lines")).
|
|
Content(Contains("Are you sure you want to delete the selected lines")).
|
|
Confirm()
|
|
}
|
|
|
|
func (self *Actions) SelectPatchOption(matcher *Matcher) {
|
|
self.t.GlobalPress(self.t.keys.Universal.CreatePatchOptionsMenu)
|
|
|
|
self.t.ExpectPopup().Menu().Title(Equals("Patch Options")).Select(matcher).Confirm()
|
|
}
|