Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/tui/search_resume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func searchApp(t *testing.T, sessions []session.Session, results []session.Searc
a.enterSearchMode()
a.searchInput.Blur() // focus the result list, not the query box
a.searchQuery = "q"
a.updateSearchResults(results)
a.updateSearchResults(results, session.SearchModeScan)
return a
}

Expand Down Expand Up @@ -64,7 +64,7 @@ func TestSearchResultLiveStateComesFromStore(t *testing.T) {
a := newTestApp([]session.Session{{ID: "s1", ShortID: "s1", ProjectName: "proj", IsLive: true}})
a.enterSearchMode()
a.searchInput.Blur()
a.updateSearchResults([]session.SearchResult{{Session: &snapshot, Snippet: "hit"}})
a.updateSearchResults([]session.SearchResult{{Session: &snapshot, Snippet: "hit"}}, session.SearchModeScan)

item := a.searchResultList.Items()[0].(searchResultItem)
if !item.live {
Expand All @@ -76,7 +76,7 @@ func TestSearchResultLiveStateComesFromStore(t *testing.T) {
b := newTestApp([]session.Session{{ID: "s2", ShortID: "s2", ProjectName: "proj2", IsLive: false}})
b.enterSearchMode()
b.searchInput.Blur()
b.updateSearchResults([]session.SearchResult{{Session: &staleLive, Snippet: "hit"}})
b.updateSearchResults([]session.SearchResult{{Session: &staleLive, Snippet: "hit"}}, session.SearchModeScan)

if b.searchResultList.Items()[0].(searchResultItem).live {
t.Error("stale snapshot won over the store — an exited session is still shown live")
Expand Down
Loading