mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
better namespacing for assertions
This commit is contained in:
@ -27,7 +27,7 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert *Assert,
|
||||
keys config.KeybindingConfig,
|
||||
) {
|
||||
assert.WorkingTreeFileCount(0)
|
||||
assert.Model().WorkingTreeFileCount(0)
|
||||
|
||||
input.Press("a")
|
||||
|
||||
|
@ -61,7 +61,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert *Assert,
|
||||
keys config.KeybindingConfig,
|
||||
) {
|
||||
assert.WorkingTreeFileCount(0)
|
||||
assert.Model().WorkingTreeFileCount(0)
|
||||
|
||||
input.Press("a")
|
||||
|
||||
@ -74,7 +74,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Content(Equals("Are you REALLY sure you want to make this file? Up to you buddy.")).
|
||||
Confirm()
|
||||
|
||||
assert.WorkingTreeFileCount(1)
|
||||
assert.Model().WorkingTreeFileCount(1)
|
||||
assert.Views().Current().SelectedLine(Contains("my file"))
|
||||
assert.Views().Main().Content(Contains(`"BAR"`))
|
||||
},
|
||||
|
@ -48,7 +48,7 @@ var MenuFromCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert *Assert,
|
||||
keys config.KeybindingConfig,
|
||||
) {
|
||||
assert.WorkingTreeFileCount(0)
|
||||
assert.Model().WorkingTreeFileCount(0)
|
||||
input.SwitchToBranchesView()
|
||||
|
||||
input.Press("a")
|
||||
@ -59,7 +59,7 @@ var MenuFromCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
|
||||
input.SwitchToFilesView()
|
||||
|
||||
assert.WorkingTreeFileCount(1)
|
||||
assert.Model().WorkingTreeFileCount(1)
|
||||
assert.Views().Current().SelectedLine(Contains("output.txt"))
|
||||
assert.Views().Main().Content(Contains("bar Branch: #feature/foo my branch feature/foo"))
|
||||
},
|
||||
|
@ -47,21 +47,20 @@ var MenuFromCommandsOutput = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert *Assert,
|
||||
keys config.KeybindingConfig,
|
||||
) {
|
||||
assert.CurrentBranchName("feature/bar")
|
||||
assert.Model().CurrentBranchName("feature/bar")
|
||||
|
||||
assert.WorkingTreeFileCount(0)
|
||||
assert.Model().WorkingTreeFileCount(0)
|
||||
input.SwitchToBranchesView()
|
||||
|
||||
input.Press("a")
|
||||
|
||||
assert.InPrompt()
|
||||
assert.Views().Current().
|
||||
input.Prompt().
|
||||
Title(Equals("Which git command do you want to run?")).
|
||||
SelectedLine(Equals("branch"))
|
||||
input.Confirm()
|
||||
InitialText(Equals("branch")).
|
||||
Confirm()
|
||||
|
||||
input.Menu().Title(Equals("Branch:")).Select(Equals("master")).Confirm()
|
||||
|
||||
assert.CurrentBranchName("master")
|
||||
assert.Model().CurrentBranchName("master")
|
||||
},
|
||||
})
|
||||
|
@ -59,7 +59,7 @@ var MultiplePrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
assert *Assert,
|
||||
keys config.KeybindingConfig,
|
||||
) {
|
||||
assert.WorkingTreeFileCount(0)
|
||||
assert.Model().WorkingTreeFileCount(0)
|
||||
|
||||
input.Press("a")
|
||||
|
||||
@ -72,7 +72,7 @@ var MultiplePrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Content(Equals("Are you REALLY sure you want to make this file? Up to you buddy.")).
|
||||
Confirm()
|
||||
|
||||
assert.WorkingTreeFileCount(1)
|
||||
assert.Model().WorkingTreeFileCount(1)
|
||||
assert.Views().Current().SelectedLine(Contains("myfile"))
|
||||
assert.Views().Main().Content(Contains("BAR"))
|
||||
},
|
||||
|
Reference in New Issue
Block a user