mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-09 09:22:48 +03:00
Add tests for clicking in status side panel
To prevent this from breaking again. All three tests would fail without the fix from the previous commit.
This commit is contained in:
35
pkg/integration/tests/status/click_to_focus.go
Normal file
35
pkg/integration/tests/status/click_to_focus.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package status
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||
)
|
||||
|
||||
var ClickToFocus = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Description: "Click in the status side panel to activate it",
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {},
|
||||
SetupRepo: func(shell *Shell) {},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Files().Focus()
|
||||
t.Views().Main().Lines(
|
||||
Contains("No changed files"),
|
||||
)
|
||||
|
||||
t.Views().Status().Click(0, 0)
|
||||
t.Views().Status().IsFocused()
|
||||
t.Views().Main().ContainsLines(
|
||||
Contains(` _`),
|
||||
Contains(` | | (_) |`),
|
||||
Contains(` | | __ _ _____ _ __ _ _| |_`),
|
||||
Contains(" | |/ _` |_ / | | |/ _` | | __|"),
|
||||
Contains(` | | (_| |/ /| |_| | (_| | | |_`),
|
||||
Contains(` |_|\__,_/___|\__, |\__, |_|\__|`),
|
||||
Contains(` __/ | __/ |`),
|
||||
Contains(` |___/ |___/`),
|
||||
Contains(``),
|
||||
Contains(`Copyright `),
|
||||
)
|
||||
},
|
||||
})
|
Reference in New Issue
Block a user