1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-03 15:02:52 +02:00

47 lines
1.2 KiB
Go
Raw Normal View History

2022-12-28 10:54:38 +11:00
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)
2022-12-28 11:00:22 +11:00
self.t.ExpectPopup().Menu().
2022-12-28 10:54:38 +11:00
Title(Equals("Rebase Options")).
Select(Contains("continue")).
Confirm()
}
func (self *Actions) ContinueRebase() {
self.ContinueMerge()
}
2023-02-22 22:25:18 +11:00
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()
}
2023-02-23 22:29:40 +11:00
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()
}
2023-02-25 13:08:45 +11:00
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()
}