Skip to content

test: add unit spec for UserDatasetComponent#5238

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

test: add unit spec for UserDatasetComponent#5238
Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:test/userDatasetSpec

Conversation

@Ma77Ball
Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • Adds user-dataset.component.spec.ts covering UserDatasetComponent (previously uncovered apart from its file-renderer child).
  • Verifies user-state tracking via UserService.userChanged(), ngAfterViewInit re-search behavior, search() filterScope variants (private / public / all), the full 8-argument SearchService.executeSearch call shape, the LakeFS mismatch warning (text + 4000ms duration), the UserDatasetVersionCreatorComponent modal config and post-close navigation, and deleteDataset (undefined-did no-op plus filtering of the deleted entry).
  • Uses direct component instantiation with vi.fn() mocks rather than the heavier TestBed pattern, so assertions can target exact positional argument shapes without bootstrapping the modal content component or the ng-zorro module graph.

Any related issues, documentation, or discussions?

Closes: #5229

How was this PR tested?

  • yarn test --include='**/user-dataset/user-dataset.component.spec.ts' --watch=false (14 tests passed, ~12ms).

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

Co-authored with Claude Opus 4.7 in compliance with ASF

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 user-dataset.component.ts

1 participant