From 030c2e5aefb15496a78b11f930e71c9254450ca2 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 6 Mar 2025 14:39:45 +0100 Subject: [PATCH] Fix postFilterTest to actually do what it says I'm pretty sure that the check for the main view was meant to be done with the commit selected in the commits panel, not with the first file of the commit files view selected, so it was pressing enter too early. It's pure coincidence that the test worked. --- pkg/integration/tests/filter_by_path/shared.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/integration/tests/filter_by_path/shared.go b/pkg/integration/tests/filter_by_path/shared.go index 3d514b96b..646df0d28 100644 --- a/pkg/integration/tests/filter_by_path/shared.go +++ b/pkg/integration/tests/filter_by_path/shared.go @@ -27,13 +27,15 @@ func postFilterTest(t *TestDriver) { Contains(`only filterFile`).IsSelected(), Contains(`both files`), ). - SelectNextItem(). - PressEnter() + SelectNextItem() // we only show the filtered file's changes in the main view t.Views().Main(). Content(Contains("filterFile").DoesNotContain("otherFile")) + t.Views().Commits(). + PressEnter() + // when you click into the commit itself, you see all files from that commit t.Views().CommitFiles(). IsFocused().