1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

add switch-to-view methods

This commit is contained in:
Jesse Duffield
2022-12-26 16:49:54 +11:00
parent 9a6f21ce42
commit c841ba8237
22 changed files with 77 additions and 51 deletions

View File

@ -29,7 +29,7 @@ var CommitMultiline = NewIntegrationTest(NewIntegrationTestArgs{
assert.CommitCount(1)
assert.HeadCommitMessage(Equals("first line"))
input.SwitchToCommitsWindow()
input.SwitchToCommitsView()
assert.MainView().Content(MatchesRegexp("first line\n\\s*\n\\s*third line"))
},
})

View File

@ -19,8 +19,8 @@ var NewBranch = NewIntegrationTest(NewIntegrationTestArgs{
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
assert.CommitCount(3)
input.SwitchToCommitsWindow()
assert.CurrentView().Name("commits").Lines(
input.SwitchToCommitsView()
assert.CurrentView().Lines(
Contains("commit 3"),
Contains("commit 2"),
Contains("commit 1"),

View File

@ -18,9 +18,9 @@ var Revert = NewIntegrationTest(NewIntegrationTestArgs{
Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) {
assert.CommitCount(1)
input.SwitchToCommitsWindow()
input.SwitchToCommitsView()
assert.CurrentView().Name("commits").Lines(
assert.CurrentView().Lines(
Contains("first commit"),
)