1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-04 10:34:55 +02:00
lazygit/pkg/integration/components/common.go
Stefan Haller 51a558040d Fix the title and text (and variable names) of the Discard Changes prompt
The title was saying "Unstage lines", which was just wrong. The text said
"Delete lines", which can be seen as a bit misleading; we are only discarding
the changes to the selected lines, not deleting the lines themselves.

For consistency, rename the config variable skipUnstageLineWarning accordingly.
2023-06-26 08:15:35 +02:00

47 lines
1.1 KiB
Go

package components
// for running common actions
type Common struct {
t *TestDriver
}
func (self *Common) ContinueMerge() {
self.t.GlobalPress(self.t.keys.Universal.CreateRebaseOptionsMenu)
self.t.ExpectPopup().Menu().
Title(Equals("Rebase options")).
Select(Contains("continue")).
Confirm()
}
func (self *Common) ContinueRebase() {
self.ContinueMerge()
}
func (self *Common) AcknowledgeConflicts() {
self.t.ExpectPopup().Menu().
Title(Equals("Conflicts!")).
Select(Contains("View conflicts")).
Confirm()
}
func (self *Common) ContinueOnConflictsResolved() {
self.t.ExpectPopup().Confirmation().
Title(Equals("Continue")).
Content(Contains("All merge conflicts resolved. Continue?")).
Confirm()
}
func (self *Common) ConfirmDiscardLines() {
self.t.ExpectPopup().Confirmation().
Title(Equals("Discard change")).
Content(Contains("Are you sure you want to discard this change")).
Confirm()
}
func (self *Common) SelectPatchOption(matcher *TextMatcher) {
self.t.GlobalPress(self.t.keys.Universal.CreatePatchOptionsMenu)
self.t.ExpectPopup().Menu().Title(Equals("Patch options")).Select(matcher).Confirm()
}