Ma77Ball opened a new issue, #5228:
URL: https://github.com/apache/texera/issues/5228

   ### Task Summary
   
   Create search-bar.component.spec.ts for 
frontend/src/app/dashboard/component/user/search-bar/search-bar.component.ts.
   
   Behavior to cover:
   - isLogin tracking — initial value comes from UserService.isLogin(); updates 
when userChanged() emits.
   - onSearchInputChange — clears listOfResult immediately for empty query; for 
non-empty pushes through searchSubject.
   - Debouncing — searchSubject emits go through debounceTime(200) (use 
fakeAsync + tick) and then getSearchResults.
   - getSearchResults caching — first call invokes 
SearchService.search([query], params, 0, 5, null, SortMethod.NameAsc, isLogin, 
includePublic=true); subsequent calls with same query return cached
   result without re-invoking service.
   - Cache eviction (addToCache) — once 20 queries are cached, adding a 21st 
evicts the oldest (queryOrder.shift() + searchCache.delete).
   - convertToName — returns correct DashboardEntry.name for workflow, project, 
file, dataset items; throws "Unexpected type in SearchResult." otherwise.
   - performSearch — navigates to DASHBOARD_SEARCH with queryParams: { q: 
keyword }.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to