mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-17 21:18:31 +02:00
Extend one of the filtering tests to start on a commit other than the first
Enabling the filter selects the first entry in the filtered commits view. It's useful to have a test that checks this, as I almost broke it in the following commit (it needs an added FocusLine call in the setFiltering function in filtering_menu_action.go).
This commit is contained in:
parent
051af6a066
commit
595c7ee73e
@ -18,10 +18,12 @@ var SelectFile = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
t.Views().Commits().
|
||||
Focus().
|
||||
Lines(
|
||||
Contains(`only filterFile`).IsSelected(),
|
||||
Contains(`none of the two`).IsSelected(),
|
||||
Contains(`only filterFile`),
|
||||
Contains(`only otherFile`),
|
||||
Contains(`both files`),
|
||||
).
|
||||
SelectNextItem().
|
||||
PressEnter()
|
||||
|
||||
// when you click into the commit itself, you see all files from that commit
|
||||
|
@ -14,6 +14,8 @@ func commonSetup(shell *Shell) {
|
||||
|
||||
shell.UpdateFileAndAdd("filterFile", "new filterFile content")
|
||||
shell.Commit("only filterFile")
|
||||
|
||||
shell.EmptyCommit("none of the two")
|
||||
}
|
||||
|
||||
func postFilterTest(t *TestDriver) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user