Skip to content

test(frontend): add unit tests for DatasetVersionSelectorComponent#5579

Open
yangzhang75 wants to merge 1 commit into
apache:mainfrom
yangzhang75:test/dataset-version-selector-spec
Open

test(frontend): add unit tests for DatasetVersionSelectorComponent#5579
yangzhang75 wants to merge 1 commit into
apache:mainfrom
yangzhang75:test/dataset-version-selector-spec

Conversation

@yangzhang75

Copy link
Copy Markdown

What changes were proposed in this PR?

Adds a unit test spec for DatasetVersionSelectorComponent, which previously had no *.spec.ts. The component is a Formly field type whose onClickOpenDatasetSelectionModal() opens a dataset-selection modal and writes the chosen value back into the form control when the modal closes with a value.

Any related issues, documentation, discussions?

Closes #5470

How was this PR tested?

New unit tests added in dataset-version-selector.component.spec.ts, run via ng test (Vitest). They cover:

  • component creation
  • onClickOpenDatasetSelectionModal() opens the dataset selection modal exactly once
  • a selected value is written back into the form control
  • the form control is left unchanged when the modal is dismissed without a value

All 4 tests pass; eslint and prettier checks are clean.

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

Generated-by: Claude Code (Claude Opus 4.8)

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for DatasetVersionSelectorComponent

1 participant