/
githubmirror
/
lazygit
Обзор
Документация
Войти
/
githubmirror
/
lazygit
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
pkg/integration/tests/interactive_rebase/reword_merge_commit.go
50 строк
1 KB
Stefan Haller
Use more widely-supported Unicode symbols for the commit graph
04 май 2026, 14:06
04 май 2026, 14:06
35d3659
Код
Авторство
О чём код?
package interactive_rebase import ( "github.com/jesseduffield/lazygit/pkg/config" . "github.com/jesseduffield/lazygit/pkg/integration/components" ) var RewordMergeCommit = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Rewords a merge commit which is not the current head commit", ExtraCmdArgs: []string{}, Skip: false, SetupConfig: func(config *config.AppConfig) {}, SetupRepo: func(shell *Shell) { shell. EmptyCommit("base"). NewBranch("first-branch"). CreateFileAndAdd("file1.txt", "content"). Commit("one"). Checkout("master"). Merge("first-branch"). NewBranch("second-branch"). EmptyCommit("two") }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Commits(). Focus(). Lines( Contains("CI ○ two").IsSelected(), Contains("CI ◎─╮ Merge branch 'first-branch'"), Contains("CI │ ○ one"), Contains("CI ○─╯ base"), ). SelectNextItem(). Press(keys.Commits.RenameCommit). Tap(func() { t.ExpectPopup().CommitMessagePanel(). Title(Equals("Reword commit")). InitialText(Equals("Merge branch 'first-branch'")). Clear(). Type("renamed merge"). Confirm() }). Lines( Contains("CI ○ two"), Contains("CI ◎─╮ renamed merge").IsSelected(), Contains("CI │ ○ one"), Contains("CI ○ ╯ base"), ) }, })