MCPcopy
hub / github.com/jesseduffield/lazygit / TestSuccess

Function TestSuccess

pkg/integration/components/test_test.go:101–116  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestSuccess(t *testing.T) {
102 test := NewIntegrationTest(NewIntegrationTestArgs{
103 Description: unitTestDescription,
104 Run: func(t *TestDriver, keys config.KeybindingConfig) {
105 t.press("a")
106 t.press("b")
107 t.click(0, 1)
108 t.click(2, 3)
109 },
110 })
111 driver := &fakeGuiDriver{}
112 test.Run(driver)
113 assert.EqualValues(t, []string{"a", "b"}, driver.pressedKeys)
114 assert.EqualValues(t, []coordinate{{0, 1}, {2, 3}}, driver.clickedCoordinates)
115 assert.Equal(t, "", driver.failureMessage)
116}
117
118func TestGitVersionRestriction(t *testing.T) {
119 scenarios := []struct {

Callers

nothing calls this directly

Calls 4

RunMethod · 0.95
NewIntegrationTestFunction · 0.85
clickMethod · 0.80
pressMethod · 0.45

Tested by

no test coverage detected