mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-03 00:57:52 +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:
@ -18,10 +18,12 @@ var SelectFile = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
t.Views().Commits().
|
t.Views().Commits().
|
||||||
Focus().
|
Focus().
|
||||||
Lines(
|
Lines(
|
||||||
Contains(`only filterFile`).IsSelected(),
|
Contains(`none of the two`).IsSelected(),
|
||||||
|
Contains(`only filterFile`),
|
||||||
Contains(`only otherFile`),
|
Contains(`only otherFile`),
|
||||||
Contains(`both files`),
|
Contains(`both files`),
|
||||||
).
|
).
|
||||||
|
SelectNextItem().
|
||||||
PressEnter()
|
PressEnter()
|
||||||
|
|
||||||
// when you click into the commit itself, you see all files from that commit
|
// 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.UpdateFileAndAdd("filterFile", "new filterFile content")
|
||||||
shell.Commit("only filterFile")
|
shell.Commit("only filterFile")
|
||||||
|
|
||||||
|
shell.EmptyCommit("none of the two")
|
||||||
}
|
}
|
||||||
|
|
||||||
func postFilterTest(t *TestDriver) {
|
func postFilterTest(t *TestDriver) {
|
||||||
|
Reference in New Issue
Block a user