Remove unused function ExpectClipboard

This can't be used because it wouldn't work on CI; delete it so that
coding agents aren't tempted to use it.
This commit is contained in:
Stefan Haller 2026-07-04 13:03:47 +02:00
parent f84ada4941
commit aa46a69f77

View file

@ -4,7 +4,6 @@ import (
"fmt"
"time"
"github.com/atotto/clipboard"
"github.com/jesseduffield/lazygit/pkg/config"
integrationTypes "github.com/jesseduffield/lazygit/pkg/integration/types"
)
@ -125,17 +124,6 @@ func (self *TestDriver) ExpectToast(matcher *TextMatcher) *TestDriver {
return self
}
func (self *TestDriver) ExpectClipboard(matcher *TextMatcher) {
self.assertWithRetries(func() (bool, string) {
text, err := clipboard.ReadAll()
if err != nil {
return false, "Error occurred when reading from clipboard: " + err.Error()
}
ok, _ := matcher.test(text)
return ok, fmt.Sprintf("Expected clipboard to match %s, but got %s", matcher.name(), text)
})
}
func (self *TestDriver) ExpectSearch() *SearchDriver {
self.inSearch()