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.
This commit is contained in:
Stefan Haller 2025-03-06 14:39:45 +01:00
parent e8d3a7afec
commit 030c2e5aef

View file

@ -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().