1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

migrate staging tests

This commit is contained in:
Jesse Duffield
2023-02-23 22:29:40 +11:00
parent 1b52a0d83f
commit c63fed2074
199 changed files with 540 additions and 2476 deletions

View File

@ -37,6 +37,13 @@ func (self *TestDriver) press(keyStr string) {
self.gui.PressKey(keyStr)
}
// Should only be used in specific cases where you're doing something weird!
// E.g. invoking a global keybinding from within a popup.
// You probably shouldn't use this function, and should instead go through a view like t.Views().Commit().Focus().Press(...)
func (self *TestDriver) GlobalPress(keyStr string) {
self.press(keyStr)
}
func (self *TestDriver) typeContent(content string) {
for _, char := range content {
self.press(string(char))