1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

combine assert and input structs, clean up interface

This commit is contained in:
Jesse Duffield
2022-12-27 16:27:36 +11:00
parent c5c9f5bb94
commit b166b8f776
47 changed files with 1021 additions and 912 deletions

View File

@ -44,23 +44,22 @@ var MenuFromCommandsOutput = NewIntegrationTest(NewIntegrationTestArgs{
Run: func(
shell *Shell,
input *Input,
assert *Assert,
keys config.KeybindingConfig,
) {
assert.Model().CurrentBranchName("feature/bar")
input.Model().CurrentBranchName("feature/bar")
input.Model().WorkingTreeFileCount(0)
assert.Model().WorkingTreeFileCount(0)
input.SwitchToBranchesView()
input.Views().Branches().
Focus().
Press("a")
input.Press("a")
input.Prompt().
input.ExpectPrompt().
Title(Equals("Which git command do you want to run?")).
InitialText(Equals("branch")).
Confirm()
input.Menu().Title(Equals("Branch:")).Select(Equals("master")).Confirm()
input.ExpectMenu().Title(Equals("Branch:")).Select(Equals("master")).Confirm()
assert.Model().CurrentBranchName("master")
input.Model().CurrentBranchName("master")
},
})