Skip to content

test: add spec for UserDatasetListItemComponent#5239

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

test: add spec for UserDatasetListItemComponent#5239
Ma77Ball wants to merge 1 commit into
apache:mainfrom
Ma77Ball:test/userDatasetListItemSpec

Conversation

@Ma77Ball
Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • Add user-dataset-list-item.component.spec.ts covering the previously untested UserDatasetListItemComponent.
  • Tests use a TestHostComponent wrapper inside <nz-list> (the component is rooted at <nz-list-item> and otherwise fails DI), mirroring the sibling UserWorkflowListItemComponent and UserProjectListItemComponent specs.
  • Coverage: entry getter (throws when unset, returns when set), dataset getter (returns entry.dataset, throws when missing), confirmUpdateDatasetCustomName and confirmUpdateDatasetCustomDescription (no-op when unchanged, success path updates the field and resets the editing flag, error path raises a NotificationService.error and still resets the flag), onClickOpenShareAccess (opens ShareAccessComponent with the expected nzData payload, footer, title, centered options, and toggles writeAccess based on accessPrivilege), the default value of the editable input, and the deleted / duplicated / refresh outputs as EventEmitters.

Any related issues, documentation, or discussions?

Closes: #5230

How was this PR tested?

  • Ran yarn ng test --watch=false --include="src/app/dashboard/component/user/user-dataset/user-dataset-list-item/user-dataset-list-item.component.spec.ts": 15 tests pass.

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-list-item.component.ts

1 participant