/
githubmirror
/
lazygit
Обзор
Документация
Войти
/
githubmirror
/
lazygit
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
pkg/integration/tests/reflog/reset.go
49 строк
1 KB
Jesse Duffield
Use sentence case everywhere
25 май 2023, 16:52
25 май 2023, 16:52
d772c9f
Код
Авторство
О чём код?
package reflog import ( "github.com/jesseduffield/lazygit/pkg/config" . "github.com/jesseduffield/lazygit/pkg/integration/components" ) var Reset = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Hard reset to a reflog commit", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell.EmptyCommit("one") shell.EmptyCommit("two") shell.EmptyCommit("three") shell.HardReset("HEAD^^") }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().ReflogCommits(). Focus(). Lines( Contains("reset: moving to HEAD^^").IsSelected(), Contains("commit: three"), Contains("commit: two"), Contains("commit (initial): one"), ). SelectNextItem(). Press(keys.Commits.ViewResetOptions). Tap(func() { t.ExpectPopup().Menu(). Title(Contains("Reset to")). Select(Contains("Hard reset")). Confirm() }). TopLines( Contains("reset: moving to").IsSelected(), Contains("reset: moving to HEAD^^"), ) t.Views().Commits(). Focus(). Lines( Contains("three").IsSelected(), Contains("two"), Contains("one"), ) }, })