Skip to content

test: cover SearchBarComponent debounce, cache, and routing#5237

Open
Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:test/searchBarSpec
Open

test: cover SearchBarComponent debounce, cache, and routing#5237
Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:test/searchBarSpec

Conversation

@Ma77Ball
Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • Added search-bar.component.spec.ts next to search-bar.component.ts with 11 cases covering every documented behavior of the component.
  • Covered isLogin initialization plus live updates from UserService.userChanged(), the empty-query clear path in onSearchInputChange, searchSubject debounce via fakeAsync + tick(200), the full SearchService.search argument list, per-query result caching, 20-entry cache eviction in addToCache, type dispatch in convertToName (workflow, project, file, dataset, plus the throw path), and performSearch navigation to DASHBOARD_SEARCH.
  • No production code changes.

Any related issues, documentation, or discussions?

Closes: #5228

How was this PR tested?

  • yarn ng test --watch=false --include "src/app/dashboard/component/user/search-bar/search-bar.component.spec.ts": 11 passed.

Was this PR authored or co-authored using generative AI tooling?

Co-authored with Claude Opus 4.7 in compliance with ASF

@Ma77Ball Ma77Ball changed the title test(frontend): cover SearchBarComponent debounce, cache, and routing test: cover SearchBarComponent debounce, cache, and routing May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add spec coverage for search-bar.component.ts

1 participant