2022-12-28 01:54:38 +02:00
|
|
|
package components
|
|
|
|
|
|
|
|
// for running common actions
|
2023-02-26 02:49:15 +02:00
|
|
|
type Common struct {
|
2022-12-28 01:54:38 +02:00
|
|
|
t *TestDriver
|
|
|
|
}
|
|
|
|
|
2023-02-26 02:49:15 +02:00
|
|
|
func (self *Common) ContinueMerge() {
|
|
|
|
self.t.GlobalPress(self.t.keys.Universal.CreateRebaseOptionsMenu)
|
2022-12-28 01:54:38 +02:00
|
|
|
|
2022-12-28 02:00:22 +02:00
|
|
|
self.t.ExpectPopup().Menu().
|
2023-05-25 13:11:51 +02:00
|
|
|
Title(Equals("Rebase options")).
|
2022-12-28 01:54:38 +02:00
|
|
|
Select(Contains("continue")).
|
|
|
|
Confirm()
|
|
|
|
}
|
|
|
|
|
2023-02-26 02:49:15 +02:00
|
|
|
func (self *Common) ContinueRebase() {
|
2022-12-28 01:54:38 +02:00
|
|
|
self.ContinueMerge()
|
|
|
|
}
|
2023-02-22 13:25:18 +02:00
|
|
|
|
2023-02-26 02:49:15 +02:00
|
|
|
func (self *Common) AcknowledgeConflicts() {
|
2023-05-31 18:29:01 +02:00
|
|
|
self.t.ExpectPopup().Menu().
|
|
|
|
Title(Equals("Conflicts!")).
|
|
|
|
Select(Contains("View conflicts")).
|
2023-02-22 13:25:18 +02:00
|
|
|
Confirm()
|
|
|
|
}
|
|
|
|
|
2023-02-26 02:49:15 +02:00
|
|
|
func (self *Common) ContinueOnConflictsResolved() {
|
2023-02-22 13:25:18 +02:00
|
|
|
self.t.ExpectPopup().Confirmation().
|
2023-05-25 13:11:51 +02:00
|
|
|
Title(Equals("Continue")).
|
|
|
|
Content(Contains("All merge conflicts resolved. Continue?")).
|
2023-02-22 13:25:18 +02:00
|
|
|
Confirm()
|
|
|
|
}
|
2023-02-23 13:29:40 +02:00
|
|
|
|
2023-02-26 02:49:15 +02:00
|
|
|
func (self *Common) ConfirmDiscardLines() {
|
2023-02-23 13:29:40 +02:00
|
|
|
self.t.ExpectPopup().Confirmation().
|
2023-04-17 17:32:10 +02:00
|
|
|
Title(Equals("Discard change")).
|
|
|
|
Content(Contains("Are you sure you want to discard this change")).
|
2023-02-23 13:29:40 +02:00
|
|
|
Confirm()
|
|
|
|
}
|
2023-02-25 04:08:45 +02:00
|
|
|
|
2023-06-03 07:12:31 +02:00
|
|
|
func (self *Common) SelectPatchOption(matcher *TextMatcher) {
|
2023-02-25 04:08:45 +02:00
|
|
|
self.t.GlobalPress(self.t.keys.Universal.CreatePatchOptionsMenu)
|
|
|
|
|
2023-05-25 13:11:51 +02:00
|
|
|
self.t.ExpectPopup().Menu().Title(Equals("Patch options")).Select(matcher).Confirm()
|
2023-02-25 04:08:45 +02:00
|
|
|
}
|