Fix deadlock when opening files and update E2E tests

This commit is contained in:
gmp
2026-06-04 13:06:30 -04:00
parent d06f8af0f7
commit ca828569f7
13 changed files with 617 additions and 97 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ type HarnessOption func(*Harness)
// NewHarness creates a test harness with the given options.
func NewHarness(opts ...HarnessOption) *Harness {
h := &Harness{
logic: editor.NewLogic(),
logic: editor.NewLogic(nil),
capture: NewFrameCapture(),
frameReceiverDone: make(chan struct{}),
}
-6
View File
@@ -13,9 +13,6 @@ import (
// TestSearchFiltersList verifies that typing in the search box filters the
// browser list so that only matching entries appear.
//
// BUG: computeVisibleEntries does not check SearchResults; it shows all
// entries in the visible window regardless of the search query.
func TestSearchFiltersList(t *testing.T) {
h := e2e.NewHarnessWithDefaults()
defer h.Cleanup()
@@ -78,9 +75,6 @@ func TestSearchFiltersList(t *testing.T) {
// TestSearchWithSortModeChange verifies that changing sort mode while
// a search query is active preserves the filter.
//
// BUG: ToggleSortOrder clears pages but doesn't recompute SearchResults.
// After a sort change, stale SearchResults indices point to different entries.
func TestSearchWithSortModeChange(t *testing.T) {
h := e2e.NewHarnessWithDefaults()
defer h.Cleanup()
-4
View File
@@ -86,10 +86,6 @@ func TestSortModeToggleCyclesThroughAllModes(t *testing.T) {
// TestSortModeToggleChangesEntryOrder verifies that toggling the sort mode
// actually changes the order of entries in the list, not just the label.
//
// BUG: The sort mode label changes but the entries remain in the same order.
// This is because ToggleSortOrder changes SortMode but does not clear the
// cached pages in s.Pages, which were loaded using the old sort order.
func TestSortModeToggleChangesEntryOrder(t *testing.T) {
h := e2e.NewHarnessWithDefaults()
defer h.Cleanup()