mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 05:57:38 -04:00
We are about to add overrides of gui.theme for dark and light backgrounds. Author and branch colors need them too, because a color that reads well on a dark background may be hard to read on a light one. Move them into gui.theme, so that the overrides cover them without a mechanism of their own. The migration of gui.branchColors creates gui.branchColorPatterns, so it now has to run before the moves. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
38 lines
984 B
Go
38 lines
984 B
Go
package commit
|
|
|
|
import (
|
|
"github.com/jesseduffield/lazygit/pkg/config"
|
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
|
)
|
|
|
|
var Highlight = NewIntegrationTest(NewIntegrationTestArgs{
|
|
Description: "Verify that the commit view highlights the correct lines",
|
|
ExtraCmdArgs: []string{},
|
|
Skip: false,
|
|
SetupConfig: func(config *config.AppConfig) {
|
|
config.GetUserConfig().Git.Log.ShowGraph = "always"
|
|
config.GetUserConfig().Gui.Theme.AuthorColors = map[string]string{
|
|
"CI": "red",
|
|
}
|
|
},
|
|
SetupRepo: func(shell *Shell) {
|
|
shell.EmptyCommit("one")
|
|
shell.EmptyCommit("two")
|
|
shell.EmptyCommit("three")
|
|
},
|
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
|
highlightedColor := "#ffffff"
|
|
|
|
t.Views().Commits().
|
|
DoesNotContainColoredText(highlightedColor, "○").
|
|
Focus().
|
|
ContainsColoredText(highlightedColor, "○")
|
|
|
|
t.Views().Files().
|
|
Focus()
|
|
|
|
t.Views().Commits().
|
|
DoesNotContainColoredText(highlightedColor, "○")
|
|
},
|
|
})
|