forked from jesseduffield/lazygit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
534703a
commit 14a9747
Showing
10 changed files
with
179 additions
and
179 deletions.
There are no files selected for viewing
22 changes: 11 additions & 11 deletions
22
pkg/integration/components/alert_asserter.go → pkg/integration/components/alert_driver.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
pkg/integration/components/commit_message_panel_asserter.go
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package components | ||
|
||
type CommitMessagePanelDriver struct { | ||
t *TestDriver | ||
} | ||
|
||
func (self *CommitMessagePanelDriver) getViewDriver() *ViewDriver { | ||
return self.t.Views().CommitMessage() | ||
} | ||
|
||
// asserts on the text initially present in the prompt | ||
func (self *CommitMessagePanelDriver) InitialText(expected *matcher) *CommitMessagePanelDriver { | ||
self.getViewDriver().Content(expected) | ||
|
||
return self | ||
} | ||
|
||
func (self *CommitMessagePanelDriver) Type(value string) *CommitMessagePanelDriver { | ||
self.t.typeContent(value) | ||
|
||
return self | ||
} | ||
|
||
func (self *CommitMessagePanelDriver) AddNewline() *CommitMessagePanelDriver { | ||
self.t.press(self.t.keys.Universal.AppendNewline) | ||
|
||
return self | ||
} | ||
|
||
func (self *CommitMessagePanelDriver) Clear() *CommitMessagePanelDriver { | ||
panic("Clear method not yet implemented!") | ||
} | ||
|
||
func (self *CommitMessagePanelDriver) Confirm() { | ||
self.getViewDriver().PressEnter() | ||
} | ||
|
||
func (self *CommitMessagePanelDriver) Cancel() { | ||
self.getViewDriver().PressEscape() | ||
} |
22 changes: 11 additions & 11 deletions
22
...ation/components/confirmation_asserter.go → ...gration/components/confirmation_driver.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package components | ||
|
||
type MenuDriver struct { | ||
t *TestDriver | ||
hasCheckedTitle bool | ||
} | ||
|
||
func (self *MenuDriver) getViewDriver() *ViewDriver { | ||
return self.t.Views().Menu() | ||
} | ||
|
||
// asserts that the popup has the expected title | ||
func (self *MenuDriver) Title(expected *matcher) *MenuDriver { | ||
self.getViewDriver().Title(expected) | ||
|
||
self.hasCheckedTitle = true | ||
|
||
return self | ||
} | ||
|
||
func (self *MenuDriver) Confirm() { | ||
self.checkNecessaryChecksCompleted() | ||
|
||
self.getViewDriver().PressEnter() | ||
} | ||
|
||
func (self *MenuDriver) Cancel() { | ||
self.checkNecessaryChecksCompleted() | ||
|
||
self.getViewDriver().PressEscape() | ||
} | ||
|
||
func (self *MenuDriver) Select(option *matcher) *MenuDriver { | ||
self.getViewDriver().NavigateToListItem(option) | ||
|
||
return self | ||
} | ||
|
||
func (self *MenuDriver) checkNecessaryChecksCompleted() { | ||
if !self.hasCheckedTitle { | ||
self.t.Fail("You must check the title of a menu popup by calling Title() before calling Confirm()/Cancel().") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.