mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
add view asserter getter struct
This commit is contained in:
@ -31,7 +31,7 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
|
||||
input.Press("a")
|
||||
|
||||
assert.View("files").Lines(
|
||||
assert.Views().ByName("files").Lines(
|
||||
Contains("myfile"),
|
||||
)
|
||||
},
|
||||
|
@ -75,7 +75,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Confirm()
|
||||
|
||||
assert.WorkingTreeFileCount(1)
|
||||
assert.CurrentView().SelectedLine(Contains("my file"))
|
||||
assert.MainView().Content(Contains(`"BAR"`))
|
||||
assert.Views().Current().SelectedLine(Contains("my file"))
|
||||
assert.Views().Main().Content(Contains(`"BAR"`))
|
||||
},
|
||||
})
|
||||
|
@ -60,7 +60,7 @@ var MenuFromCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
input.SwitchToFilesView()
|
||||
|
||||
assert.WorkingTreeFileCount(1)
|
||||
assert.CurrentView().SelectedLine(Contains("output.txt"))
|
||||
assert.MainView().Content(Contains("bar Branch: #feature/foo my branch feature/foo"))
|
||||
assert.Views().Current().SelectedLine(Contains("output.txt"))
|
||||
assert.Views().Main().Content(Contains("bar Branch: #feature/foo my branch feature/foo"))
|
||||
},
|
||||
})
|
||||
|
@ -55,7 +55,7 @@ var MenuFromCommandsOutput = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
input.Press("a")
|
||||
|
||||
assert.InPrompt()
|
||||
assert.CurrentView().
|
||||
assert.Views().Current().
|
||||
Title(Equals("Which git command do you want to run?")).
|
||||
SelectedLine(Equals("branch"))
|
||||
input.Confirm()
|
||||
|
@ -73,7 +73,7 @@ var MultiplePrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Confirm()
|
||||
|
||||
assert.WorkingTreeFileCount(1)
|
||||
assert.CurrentView().SelectedLine(Contains("myfile"))
|
||||
assert.MainView().Content(Contains("BAR"))
|
||||
assert.Views().Current().SelectedLine(Contains("myfile"))
|
||||
assert.Views().Main().Content(Contains("BAR"))
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user