From 1ab66ab12be43e78b10bc93c37805f0e5df6b4cc Mon Sep 17 00:00:00 2001 From: nsemets Date: Fri, 12 Sep 2025 10:42:06 +0300 Subject: [PATCH 1/4] fix(imports): updated imports --- .../addon-card-list.component.ts | 3 ++- src/app/shared/components/addons/index.ts | 10 ++++---- .../storage-item-selector.component.ts | 13 +++++----- .../file-secondary-metadata.component.html | 24 +++++-------------- .../resource-card.component.html | 4 ---- .../resource-metadata.component.ts | 2 +- .../status-badge/status-badge.component.ts | 3 +-- .../components/stepper/stepper.component.ts | 3 ++- .../components/subjects/subjects.component.ts | 2 +- .../add-wiki-dialog.component.ts | 3 ++- .../view-section/view-section.component.ts | 3 ++- src/app/shared/constants/index.ts | 1 + .../registration-statuses.ts} | 4 ++-- 13 files changed, 32 insertions(+), 43 deletions(-) rename src/app/shared/{components/status-badge/default-statuses.ts => constants/registration-statuses.ts} (93%) diff --git a/src/app/shared/components/addons/addon-card-list/addon-card-list.component.ts b/src/app/shared/components/addons/addon-card-list/addon-card-list.component.ts index 88922ed4a..cc1d8d41c 100644 --- a/src/app/shared/components/addons/addon-card-list/addon-card-list.component.ts +++ b/src/app/shared/components/addons/addon-card-list/addon-card-list.component.ts @@ -2,9 +2,10 @@ import { TranslatePipe } from '@ngx-translate/core'; import { Component, input } from '@angular/core'; -import { AddonCardComponent } from '@shared/components/addons'; import { AddonModel, AuthorizedAccountModel, ConfiguredAddonModel } from '@shared/models'; +import { AddonCardComponent } from '../addon-card/addon-card.component'; + @Component({ selector: 'osf-addon-card-list', imports: [AddonCardComponent, TranslatePipe], diff --git a/src/app/shared/components/addons/index.ts b/src/app/shared/components/addons/index.ts index ee8d4f816..8c5184159 100644 --- a/src/app/shared/components/addons/index.ts +++ b/src/app/shared/components/addons/index.ts @@ -1,5 +1,5 @@ -export { AddonCardComponent } from '@shared/components/addons/addon-card/addon-card.component'; -export { AddonCardListComponent } from '@shared/components/addons/addon-card-list/addon-card-list.component'; -export { AddonSetupAccountFormComponent } from '@shared/components/addons/addon-setup-account-form/addon-setup-account-form.component'; -export { AddonTermsComponent } from '@shared/components/addons/addon-terms/addon-terms.component'; -export { StorageItemSelectorComponent } from '@shared/components/addons/storage-item-selector/storage-item-selector.component'; +export { AddonCardComponent } from './addon-card/addon-card.component'; +export { AddonCardListComponent } from './addon-card-list/addon-card-list.component'; +export { AddonSetupAccountFormComponent } from './addon-setup-account-form/addon-setup-account-form.component'; +export { AddonTermsComponent } from './addon-terms/addon-terms.component'; +export { StorageItemSelectorComponent } from './storage-item-selector/storage-item-selector.component'; diff --git a/src/app/shared/components/addons/storage-item-selector/storage-item-selector.component.ts b/src/app/shared/components/addons/storage-item-selector/storage-item-selector.component.ts index 06b15c0ca..5ba74e824 100644 --- a/src/app/shared/components/addons/storage-item-selector/storage-item-selector.component.ts +++ b/src/app/shared/components/addons/storage-item-selector/storage-item-selector.component.ts @@ -28,12 +28,13 @@ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop'; import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { OperationNames } from '@osf/features/project/addons/enums'; -import { SelectComponent } from '@shared/components'; -import { ResourceTypeInfoDialogComponent } from '@shared/components/addons/resource-type-info-dialog/resource-type-info-dialog.component'; -import { AddonType, StorageItemType } from '@shared/enums'; -import { convertCamelCaseToNormal, IS_MEDIUM, IS_XSMALL } from '@shared/helpers'; -import { OperationInvokeData, StorageItem } from '@shared/models'; -import { AddonsSelectors, ClearOperationInvocations } from '@shared/stores/addons'; +import { AddonType, StorageItemType } from '@osf/shared/enums'; +import { convertCamelCaseToNormal, IS_MEDIUM, IS_XSMALL } from '@osf/shared/helpers'; +import { OperationInvokeData, StorageItem } from '@osf/shared/models'; +import { AddonsSelectors, ClearOperationInvocations } from '@osf/shared/stores'; + +import { SelectComponent } from '../../select/select.component'; +import { ResourceTypeInfoDialogComponent } from '../resource-type-info-dialog/resource-type-info-dialog.component'; import { GoogleFilePickerComponent } from './google-file-picker/google-file-picker.component'; diff --git a/src/app/shared/components/resource-card/components/file-secondary-metadata/file-secondary-metadata.component.html b/src/app/shared/components/resource-card/components/file-secondary-metadata/file-secondary-metadata.component.html index f176a523d..7612fa4f0 100644 --- a/src/app/shared/components/resource-card/components/file-secondary-metadata/file-secondary-metadata.component.html +++ b/src/app/shared/components/resource-card/components/file-secondary-metadata/file-secondary-metadata.component.html @@ -28,26 +28,18 @@ @if (nodeLicense) {

{{ 'resourceCard.labels.license' | translate }} - <<<<<<< HEAD - {{ - nodeLicense!.name - }} - ======= - {{ nodeLicense!.name }} - >>>>>>> origin/develop + + {{ nodeLicense!.name }} +

} @if (resourceValue.absoluteUrl) {

{{ 'resourceCard.labels.url' | translate }} - <<<<<<< HEAD - {{ - resourceValue.absoluteUrl - }} - ======= - {{ resourceValue.absoluteUrl }} - >>>>>>> origin/develop + + {{ resourceValue.absoluteUrl }} +

} @@ -55,11 +47,7 @@

{{ 'resourceCard.labels.doi' | translate }} @for (doi of resourceValue.doi.slice(0, limit); track $index) { - <<<<<<< HEAD {{ doi }}{{ $last ? '' : ', ' }} - ======= - {{ doi }}{{ $last ? '' : ', ' }} - >>>>>>> origin/develop } @if (resourceValue.doi.length > limit) { {{ 'resourceCard.andCountMore' | translate: { count: resourceValue.doi.length - limit } }} diff --git a/src/app/shared/components/resource-card/resource-card.component.html b/src/app/shared/components/resource-card/resource-card.component.html index f74185f10..e598feca7 100644 --- a/src/app/shared/components/resource-card/resource-card.component.html +++ b/src/app/shared/components/resource-card/resource-card.component.html @@ -7,11 +7,7 @@

- <<<<<<< HEAD {{ displayTitle() }} - ======= - {{ displayTitle() }} - >>>>>>> origin/develop

@if (isWithdrawn()) { {{ 'resourceCard.labels.withdrawn' | translate }} diff --git a/src/app/shared/components/resource-metadata/resource-metadata.component.ts b/src/app/shared/components/resource-metadata/resource-metadata.component.ts index 4bab85051..519f42d73 100644 --- a/src/app/shared/components/resource-metadata/resource-metadata.component.ts +++ b/src/app/shared/components/resource-metadata/resource-metadata.component.ts @@ -9,9 +9,9 @@ import { RouterLink } from '@angular/router'; import { OverviewCollectionsComponent } from '@osf/features/project/overview/components/overview-collections/overview-collections.component'; import { CurrentResourceType } from '@osf/shared/enums'; -import { AffiliatedInstitutionsViewComponent } from '@shared/components'; import { ResourceOverview } from '@shared/models'; +import { AffiliatedInstitutionsViewComponent } from '../affiliated-institutions-view/affiliated-institutions-view.component'; import { ResourceCitationsComponent } from '../resource-citations/resource-citations.component'; import { TruncatedTextComponent } from '../truncated-text/truncated-text.component'; diff --git a/src/app/shared/components/status-badge/status-badge.component.ts b/src/app/shared/components/status-badge/status-badge.component.ts index 2e6fe03ff..dfcc56bd8 100644 --- a/src/app/shared/components/status-badge/status-badge.component.ts +++ b/src/app/shared/components/status-badge/status-badge.component.ts @@ -4,11 +4,10 @@ import { Tag } from 'primeng/tag'; import { ChangeDetectionStrategy, Component, input } from '@angular/core'; +import { RegistryStatusMap } from '@osf/shared/constants'; import { RegistryStatus } from '@osf/shared/enums'; import { SeverityType } from '@osf/shared/models'; -import { RegistryStatusMap } from './default-statuses'; - @Component({ selector: 'osf-status-badge', imports: [Tag, TranslatePipe], diff --git a/src/app/shared/components/stepper/stepper.component.ts b/src/app/shared/components/stepper/stepper.component.ts index 4924f3192..a8b0fe146 100644 --- a/src/app/shared/components/stepper/stepper.component.ts +++ b/src/app/shared/components/stepper/stepper.component.ts @@ -2,9 +2,10 @@ import { TranslatePipe } from '@ngx-translate/core'; import { ChangeDetectionStrategy, Component, input, model } from '@angular/core'; -import { IconComponent } from '@shared/components'; import { StepOption } from '@shared/models'; +import { IconComponent } from '../icon/icon.component'; + @Component({ selector: 'osf-stepper', imports: [IconComponent, TranslatePipe], diff --git a/src/app/shared/components/subjects/subjects.component.ts b/src/app/shared/components/subjects/subjects.component.ts index d87b132d5..cb0879323 100644 --- a/src/app/shared/components/subjects/subjects.component.ts +++ b/src/app/shared/components/subjects/subjects.component.ts @@ -15,7 +15,7 @@ import { ChangeDetectionStrategy, Component, computed, input, output } from '@an import { FormControl } from '@angular/forms'; import { SubjectModel } from '@osf/shared/models'; -import { SubjectsSelectors } from '@shared/stores'; +import { SubjectsSelectors } from '@osf/shared/stores'; import { SearchInputComponent } from '../search-input/search-input.component'; diff --git a/src/app/shared/components/wiki/add-wiki-dialog/add-wiki-dialog.component.ts b/src/app/shared/components/wiki/add-wiki-dialog/add-wiki-dialog.component.ts index a6d662da0..5be3cbf7c 100644 --- a/src/app/shared/components/wiki/add-wiki-dialog/add-wiki-dialog.component.ts +++ b/src/app/shared/components/wiki/add-wiki-dialog/add-wiki-dialog.component.ts @@ -8,13 +8,14 @@ import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; -import { TextInputComponent } from '@osf/shared/components'; import { InputLimits } from '@osf/shared/constants'; import { ResourceType } from '@osf/shared/enums'; import { CustomValidators } from '@osf/shared/helpers'; import { ToastService } from '@osf/shared/services'; import { CreateWiki, WikiSelectors } from '@osf/shared/stores'; +import { TextInputComponent } from '../../text-input/text-input.component'; + @Component({ selector: 'osf-add-wiki-dialog-component', imports: [Button, ReactiveFormsModule, TranslatePipe, TextInputComponent], diff --git a/src/app/shared/components/wiki/view-section/view-section.component.ts b/src/app/shared/components/wiki/view-section/view-section.component.ts index b0371ada9..a7b6ea907 100644 --- a/src/app/shared/components/wiki/view-section/view-section.component.ts +++ b/src/app/shared/components/wiki/view-section/view-section.component.ts @@ -7,9 +7,10 @@ import { Skeleton } from 'primeng/skeleton'; import { ChangeDetectionStrategy, Component, computed, effect, input, output, signal } from '@angular/core'; import { FormsModule } from '@angular/forms'; -import { MarkdownComponent } from '@osf/shared/components'; import { WikiVersion } from '@osf/shared/models'; +import { MarkdownComponent } from '../../markdown/markdown.component'; + @Component({ selector: 'osf-view-section', imports: [PanelModule, Select, FormsModule, TranslatePipe, Skeleton, MarkdownComponent], diff --git a/src/app/shared/constants/index.ts b/src/app/shared/constants/index.ts index 243495732..6d9b00431 100644 --- a/src/app/shared/constants/index.ts +++ b/src/app/shared/constants/index.ts @@ -9,6 +9,7 @@ export * from './input-limits.const'; export * from './input-validation-messages.const'; export * from './language.const'; export * from './pie-chart-palette'; +export * from './registration-statuses'; export * from './registry-services-icons.const'; export * from './resource-card-labels.const'; export * from './resource-types.const'; diff --git a/src/app/shared/components/status-badge/default-statuses.ts b/src/app/shared/constants/registration-statuses.ts similarity index 93% rename from src/app/shared/components/status-badge/default-statuses.ts rename to src/app/shared/constants/registration-statuses.ts index 101c7f5e0..156d7a693 100644 --- a/src/app/shared/components/status-badge/default-statuses.ts +++ b/src/app/shared/constants/registration-statuses.ts @@ -1,5 +1,5 @@ -import { RegistryStatus } from '@osf/shared/enums'; -import { StatusInfo } from '@osf/shared/models'; +import { RegistryStatus } from '../enums'; +import { StatusInfo } from '../models'; export const RegistryStatusMap: Record = { [RegistryStatus.None]: { label: '', severity: null }, From 85f575ae5d167e2cf78461a656a43990f3d19fa6 Mon Sep 17 00:00:00 2001 From: nsemets Date: Fri, 12 Sep 2025 12:51:14 +0300 Subject: [PATCH 2/4] fix(contributors-metadata): updated edit for contributors in metadata --- .../project-contributors-step.component.html | 1 - ...ata-affiliated-institutions.component.html | 1 + .../metadata-contributors.component.html | 5 +- .../metadata-description.component.html | 5 +- .../metadata-funding.component.html | 13 ++- .../metadata-license.component.html | 3 +- .../metadata-publication-doi.component.html | 1 + ...tadata-resource-information.component.html | 5 +- ...iliated-institutions-dialog.component.html | 8 +- .../contributors-dialog.component.html | 85 +++++++++---------- .../contributors-dialog.component.ts | 78 +++++++++++------ .../description-dialog.component.html | 14 ++- .../funding-dialog.component.html | 14 ++- ...resource-information-dialog.component.html | 14 ++- .../features/metadata/metadata.component.ts | 3 +- .../add-metadata/add-metadata.component.html | 3 +- .../contributors/contributors.component.html | 2 +- .../confirm-email/confirm-email.component.ts | 3 +- .../add-contributor-dialog.component.html | 3 + ...gistered-contributor-dialog.component.html | 9 +- .../contributors-list.component.html | 63 ++++++++------ .../contributors-list.component.spec.ts | 8 +- .../contributors-list.component.ts | 4 +- .../sub-header/sub-header.component.html | 1 + 24 files changed, 217 insertions(+), 129 deletions(-) diff --git a/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.html b/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.html index 3bb5e8140..f0715c95f 100644 --- a/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.html +++ b/src/app/features/collections/components/add-to-collection/project-contributors-step/project-contributors-step.component.html @@ -41,7 +41,6 @@

{{ 'collections.addToCollection.projectContributors' | translate }}

class="w-full" [contributors]="projectContributors()" [isLoading]="isContributorsLoading()" - [showCuratorColumn]="false" (remove)="handleRemoveContributor($event)" > diff --git a/src/app/features/metadata/components/metadata-affiliated-institutions/metadata-affiliated-institutions.component.html b/src/app/features/metadata/components/metadata-affiliated-institutions/metadata-affiliated-institutions.component.html index 21b111021..90fb07ee2 100644 --- a/src/app/features/metadata/components/metadata-affiliated-institutions/metadata-affiliated-institutions.component.html +++ b/src/app/features/metadata/components/metadata-affiliated-institutions/metadata-affiliated-institutions.component.html @@ -7,6 +7,7 @@

{{ 'project.overview.metadata.affiliatedInstitutions' | translate }}

severity="secondary" [label]="'common.buttons.edit' | translate" (onClick)="openEditAffiliatedInstitutionsDialog.emit()" + data-test-edit-institutions-button > }
diff --git a/src/app/features/metadata/components/metadata-contributors/metadata-contributors.component.html b/src/app/features/metadata/components/metadata-contributors/metadata-contributors.component.html index a65f57fb3..1d8eb0a3a 100644 --- a/src/app/features/metadata/components/metadata-contributors/metadata-contributors.component.html +++ b/src/app/features/metadata/components/metadata-contributors/metadata-contributors.component.html @@ -7,6 +7,7 @@

{{ 'project.overview.metadata.contributors' | translate }}

(onClick)="openEditContributorDialog.emit()" severity="secondary" [label]="'common.buttons.edit' | translate" + data-test-edit-contributors-button > } @@ -15,7 +16,9 @@

{{ 'project.overview.metadata.contributors' | translate }}

@for (contributor of contributors(); track contributor.id) {
- {{ contributor.fullName }} + + {{ contributor.fullName }} + {{ $last ? '' : ',' }}
} diff --git a/src/app/features/metadata/components/metadata-description/metadata-description.component.html b/src/app/features/metadata/components/metadata-description/metadata-description.component.html index 69fdc299b..9d39ea27d 100644 --- a/src/app/features/metadata/components/metadata-description/metadata-description.component.html +++ b/src/app/features/metadata/components/metadata-description/metadata-description.component.html @@ -7,9 +7,12 @@

{{ 'project.overview.metadata.description' | translate }}

severity="secondary" [label]="'common.buttons.edit' | translate" (onClick)="openEditDescriptionDialog.emit()" + data-test-edit-description-button > }
-

{{ description() || ('project.overview.metadata.noDescription' | translate) }}

+

+ {{ description() || ('project.overview.metadata.noDescription' | translate) }} +

diff --git a/src/app/features/metadata/components/metadata-funding/metadata-funding.component.html b/src/app/features/metadata/components/metadata-funding/metadata-funding.component.html index 5fa7fa5e7..2de52f798 100644 --- a/src/app/features/metadata/components/metadata-funding/metadata-funding.component.html +++ b/src/app/features/metadata/components/metadata-funding/metadata-funding.component.html @@ -7,6 +7,7 @@

{{ 'project.overview.metadata.fundingSupport' | translate }}

severity="secondary" [label]="'common.buttons.edit' | translate" (onClick)="openEditFundingDialog.emit()" + data-test-edit-funding-button > } @@ -15,9 +16,13 @@

{{ 'project.overview.metadata.fundingSupport' | translate }}

@for (funder of funders(); track funder.funderIdentifier) {
-

{{ 'files.detail.resourceMetadata.fields.funder' | translate }}: {{ funder.funderName }}

+

+ {{ 'files.detail.resourceMetadata.fields.funder' | translate }}: {{ funder.funderName }} +

-

{{ 'files.detail.resourceMetadata.fields.awardTitle' | translate }}: {{ funder.awardTitle }}

+

+ {{ 'files.detail.resourceMetadata.fields.awardTitle' | translate }}: {{ funder.awardTitle }} +

@if (funder.awardUri) {

@@ -29,7 +34,9 @@

{{ 'project.overview.metadata.fundingSupport' | translate }}

} @if (funder.awardNumber) { -

{{ 'files.detail.resourceMetadata.fields.awardNumber' | translate }}: {{ funder.awardNumber }}

+

+ {{ 'files.detail.resourceMetadata.fields.awardNumber' | translate }}: {{ funder.awardNumber }} +

}
} diff --git a/src/app/features/metadata/components/metadata-license/metadata-license.component.html b/src/app/features/metadata/components/metadata-license/metadata-license.component.html index d4a993b05..ec313d5de 100644 --- a/src/app/features/metadata/components/metadata-license/metadata-license.component.html +++ b/src/app/features/metadata/components/metadata-license/metadata-license.component.html @@ -7,11 +7,12 @@

{{ 'project.overview.metadata.license' | translate }}

severity="secondary" [label]="'common.buttons.edit' | translate" (onClick)="openEditLicenseDialog.emit()" + data-test-edit-license-button /> }
-

{{ license()?.name || ('project.overview.metadata.noLicense' | translate) }}

+

{{ license()?.name || ('project.overview.metadata.noLicense' | translate) }}

diff --git a/src/app/features/metadata/components/metadata-publication-doi/metadata-publication-doi.component.html b/src/app/features/metadata/components/metadata-publication-doi/metadata-publication-doi.component.html index 477b6f458..b01ba6977 100644 --- a/src/app/features/metadata/components/metadata-publication-doi/metadata-publication-doi.component.html +++ b/src/app/features/metadata/components/metadata-publication-doi/metadata-publication-doi.component.html @@ -7,6 +7,7 @@

{{ 'project.overview.metadata.publication' | translate }}

severity="secondary" [label]="'common.buttons.edit' | translate" (onClick)="openEditPublicationDoiDialog.emit()" + data-test-edit-doi-button > } diff --git a/src/app/features/metadata/components/metadata-resource-information/metadata-resource-information.component.html b/src/app/features/metadata/components/metadata-resource-information/metadata-resource-information.component.html index 5f2621417..e18e32d09 100644 --- a/src/app/features/metadata/components/metadata-resource-information/metadata-resource-information.component.html +++ b/src/app/features/metadata/components/metadata-resource-information/metadata-resource-information.component.html @@ -15,6 +15,7 @@

severity="secondary" [label]="'common.buttons.edit' | translate" (onClick)="openEditResourceInformationDialog.emit()" + data-test-edit-resource-information-button > } @@ -22,12 +23,12 @@

@if (customItemMetadata()?.resourceTypeGeneral) {
-

+

{{ 'project.overview.metadata.resourceType' | translate }}: {{ getResourceTypeName(customItemMetadata()?.resourceTypeGeneral!) }}

-

+

{{ 'project.overview.metadata.resourceLanguage' | translate }}: {{ getLanguageName(customItemMetadata()?.language || '') }}

diff --git a/src/app/features/metadata/dialogs/affiliated-institutions-dialog/affiliated-institutions-dialog.component.html b/src/app/features/metadata/dialogs/affiliated-institutions-dialog/affiliated-institutions-dialog.component.html index 2c4a1e26d..016f57413 100644 --- a/src/app/features/metadata/dialogs/affiliated-institutions-dialog/affiliated-institutions-dialog.component.html +++ b/src/app/features/metadata/dialogs/affiliated-institutions-dialog/affiliated-institutions-dialog.component.html @@ -7,10 +7,16 @@
- +
diff --git a/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.html b/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.html index 6b9690a0e..11ef9c4cf 100644 --- a/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.html +++ b/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.html @@ -4,9 +4,9 @@

{{ 'project.contributors.addContributor' | translate }}

@@ -14,52 +14,43 @@

{{ 'project.contributors.addContributor' | translate }}

-
- @if (isContributorsLoading()) { -
- @for (item of [1, 2, 3]; track item) { -
-
- - -
- -
- } -
- } @else { - @if (contributors().length === 0) { -
- {{ 'project.contributors.table.emptyMessage' | translate }} -
- } @else { -
- @for (contributor of contributors(); track contributor.id) { -
-
-
- {{ contributor.fullName }} - {{ contributor.permission | translate | titlecase }} -
-
+ - -
- } -
- } - } -
+ @if (hasChanges) { +
+ + + + +
+ }
- - +
diff --git a/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.ts b/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.ts index e81e91e79..007daa5e7 100644 --- a/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.ts +++ b/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.ts @@ -4,13 +4,10 @@ import { TranslatePipe, TranslateService } from '@ngx-translate/core'; import { Button } from 'primeng/button'; import { DialogService, DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; -import { Skeleton } from 'primeng/skeleton'; -import { Tooltip } from 'primeng/tooltip'; import { filter, forkJoin } from 'rxjs'; -import { TitleCasePipe } from '@angular/common'; -import { ChangeDetectionStrategy, Component, DestroyRef, inject, OnInit, signal } from '@angular/core'; +import { ChangeDetectionStrategy, Component, DestroyRef, effect, inject, OnInit, signal } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { FormControl, FormsModule } from '@angular/forms'; @@ -18,22 +15,25 @@ import { SearchInputComponent } from '@osf/shared/components'; import { AddContributorDialogComponent, AddUnregisteredContributorDialogComponent, + ContributorsListComponent, } from '@osf/shared/components/contributors'; import { AddContributorType, ResourceType } from '@osf/shared/enums'; +import { findChangedItems } from '@osf/shared/helpers'; import { ContributorDialogAddModel, ContributorModel } from '@osf/shared/models'; -import { ToastService } from '@osf/shared/services'; +import { CustomConfirmationService, ToastService } from '@osf/shared/services'; import { AddContributor, ContributorsSelectors, DeleteContributor, UpdateBibliographyFilter, + UpdateContributor, UpdatePermissionFilter, UpdateSearchValue, } from '@osf/shared/stores'; @Component({ selector: 'osf-contributors-dialog', - imports: [Button, SearchInputComponent, Skeleton, Tooltip, TranslatePipe, TitleCasePipe, FormsModule], + imports: [Button, SearchInputComponent, TranslatePipe, FormsModule, ContributorsListComponent], templateUrl: './contributors-dialog.component.html', changeDetection: ChangeDetectionStrategy.OnPush, providers: [DialogService], @@ -47,14 +47,18 @@ export class ContributorsDialogComponent implements OnInit { readonly dialogRef = inject(DynamicDialogRef); readonly config = inject(DynamicDialogConfig); readonly dialogService = inject(DialogService); - isContributorsLoading = signal(false); - contributors = select(ContributorsSelectors.getContributors); + readonly customConfirmationService = inject(CustomConfirmationService); + + isLoading = select(ContributorsSelectors.isContributorsLoading); + initialContributors = select(ContributorsSelectors.getContributors); + contributors = signal([]); actions = createDispatchMap({ updateSearchValue: UpdateSearchValue, updatePermissionFilter: UpdatePermissionFilter, updateBibliographyFilter: UpdateBibliographyFilter, deleteContributor: DeleteContributor, addContributor: AddContributor, + updateContributor: UpdateContributor, }); private readonly resourceType: ResourceType; @@ -62,10 +66,15 @@ export class ContributorsDialogComponent implements OnInit { constructor() { this.resourceId = this.config.data?.resourceId; - this.resourceType = this.config.data?.resourceType; - this.isContributorsLoading.set(this.config.data?.isLoading || false); + effect(() => { + this.contributors.set(JSON.parse(JSON.stringify(this.initialContributors()))); + }); + } + + get hasChanges(): boolean { + return JSON.stringify(this.initialContributors()) !== JSON.stringify(this.contributors()); } ngOnInit(): void { @@ -79,7 +88,7 @@ export class ContributorsDialogComponent implements OnInit { } openAddContributorDialog(): void { - const addedContributorIds = this.contributors().map((x) => x.userId); + const addedContributorIds = this.initialContributors().map((x) => x.userId); this.dialogService .open(AddContributorDialogComponent, { @@ -104,10 +113,9 @@ export class ContributorsDialogComponent implements OnInit { this.actions.addContributor(this.resourceId, this.resourceType, payload) ); - forkJoin(addRequests).subscribe(() => { - this.toastService.showSuccess('project.contributors.toastMessages.multipleAddSuccessMessage'); - this.dialogRef.close({ refresh: true }); - }); + forkJoin(addRequests).subscribe(() => + this.toastService.showSuccess('project.contributors.toastMessages.multipleAddSuccessMessage') + ); } } }); @@ -141,17 +149,27 @@ export class ContributorsDialogComponent implements OnInit { } removeContributor(contributor: ContributorModel): void { - this.actions - .deleteContributor(this.resourceId, this.resourceType, contributor.userId) - .pipe(takeUntilDestroyed(this.destroyRef)) - .subscribe({ - next: () => { - this.toastService.showSuccess('project.contributors.removeDialog.successMessage', { - name: contributor.fullName, + this.customConfirmationService.confirmDelete({ + headerKey: 'project.contributors.removeDialog.title', + messageKey: 'project.contributors.removeDialog.message', + messageParams: { name: contributor.fullName }, + acceptLabelKey: 'common.buttons.remove', + onConfirm: () => { + this.actions + .deleteContributor(this.resourceId, this.resourceType, contributor.userId) + .pipe(takeUntilDestroyed(this.destroyRef)) + .subscribe({ + next: () => + this.toastService.showSuccess('project.contributors.removeDialog.successMessage', { + name: contributor.fullName, + }), }); - this.dialogRef.close({ refresh: true }); - }, - }); + }, + }); + } + + cancel() { + this.contributors.set(JSON.parse(JSON.stringify(this.initialContributors()))); } onClose(): void { @@ -159,6 +177,14 @@ export class ContributorsDialogComponent implements OnInit { } onSave(): void { - this.dialogRef.close({ saved: true }); + const updatedContributors = findChangedItems(this.initialContributors(), this.contributors(), 'id'); + + const updateRequests = updatedContributors.map((payload) => + this.actions.updateContributor(this.resourceId, this.resourceType, payload) + ); + + forkJoin(updateRequests).subscribe(() => { + this.toastService.showSuccess('project.contributors.toastMessages.multipleUpdateSuccessMessage'); + }); } } diff --git a/src/app/features/metadata/dialogs/description-dialog/description-dialog.component.html b/src/app/features/metadata/dialogs/description-dialog/description-dialog.component.html index 591756ac2..38880ada2 100644 --- a/src/app/features/metadata/dialogs/description-dialog/description-dialog.component.html +++ b/src/app/features/metadata/dialogs/description-dialog/description-dialog.component.html @@ -9,7 +9,17 @@ >
- - + +
diff --git a/src/app/features/metadata/dialogs/funding-dialog/funding-dialog.component.html b/src/app/features/metadata/dialogs/funding-dialog/funding-dialog.component.html index 33a353b0b..b69c00400 100644 --- a/src/app/features/metadata/dialogs/funding-dialog/funding-dialog.component.html +++ b/src/app/features/metadata/dialogs/funding-dialog/funding-dialog.component.html @@ -71,7 +71,17 @@
- - + +
diff --git a/src/app/features/metadata/dialogs/resource-information-dialog/resource-information-dialog.component.html b/src/app/features/metadata/dialogs/resource-information-dialog/resource-information-dialog.component.html index d5a9d26f5..4ee45406b 100644 --- a/src/app/features/metadata/dialogs/resource-information-dialog/resource-information-dialog.component.html +++ b/src/app/features/metadata/dialogs/resource-information-dialog/resource-information-dialog.component.html @@ -40,7 +40,17 @@
- - + +
diff --git a/src/app/features/metadata/metadata.component.ts b/src/app/features/metadata/metadata.component.ts index 5054fd063..08f5ad69c 100644 --- a/src/app/features/metadata/metadata.component.ts +++ b/src/app/features/metadata/metadata.component.ts @@ -289,10 +289,9 @@ export class MetadataComponent implements OnInit { data: { resourceId: this.resourceId, resourceType: this.resourceType(), - isLoading: this.isContributorsLoading(), }, }); - dialogRef.onClose.pipe(filter((result) => !!result && (result.refresh || result.saved))).subscribe({ + dialogRef.onClose.pipe(filter((result) => !!result)).subscribe({ next: () => { this.actions.getResourceMetadata(this.resourceId, this.resourceType()); this.toastService.showSuccess('project.metadata.contributors.updateSucceed'); diff --git a/src/app/features/metadata/pages/add-metadata/add-metadata.component.html b/src/app/features/metadata/pages/add-metadata/add-metadata.component.html index 7fc6f84f4..a370c83f1 100644 --- a/src/app/features/metadata/pages/add-metadata/add-metadata.component.html +++ b/src/app/features/metadata/pages/add-metadata/add-metadata.component.html @@ -38,7 +38,8 @@

{{ meta.attributes.template.title }}

} diff --git a/src/app/features/project/contributors/contributors.component.html b/src/app/features/project/contributors/contributors.component.html index 5bed0121b..264057038 100644 --- a/src/app/features/project/contributors/contributors.component.html +++ b/src/app/features/project/contributors/contributors.component.html @@ -64,7 +64,7 @@

{{ 'navigation.contributors' | translate } class="w-full" [contributors]="contributors()" [isLoading]="isContributorsLoading()" - [showCuratorColumn]="true" + [showCurator]="true" (remove)="removeContributor($event)" > diff --git a/src/app/shared/components/confirm-email/confirm-email.component.ts b/src/app/shared/components/confirm-email/confirm-email.component.ts index 6e1020e42..c7ce1f632 100644 --- a/src/app/shared/components/confirm-email/confirm-email.component.ts +++ b/src/app/shared/components/confirm-email/confirm-email.component.ts @@ -10,10 +10,11 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; import { FormsModule } from '@angular/forms'; import { DeleteEmail, UserEmailsSelectors, VerifyEmail } from '@core/store/user-emails'; -import { LoadingSpinnerComponent } from '@osf/shared/components'; import { AccountEmailModel } from '@osf/shared/models'; import { ToastService } from '@osf/shared/services'; +import { LoadingSpinnerComponent } from '../loading-spinner/loading-spinner.component'; + @Component({ selector: 'osf-confirm-email', imports: [Button, FormsModule, TranslatePipe, LoadingSpinnerComponent], diff --git a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html index 9f9bc7d7d..f471d1f6f 100644 --- a/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html +++ b/src/app/shared/components/contributors/add-contributor-dialog/add-contributor-dialog.component.html @@ -37,6 +37,7 @@ severity="secondary" [label]="'project.contributors.addDialog.addUnregisteredContributor' | translate" (click)="addUnregistered()" + data-test-add-unregistered-contributor-button /> } @@ -59,6 +60,7 @@ (click)="dialogRef.close()" severity="info" [label]="'common.buttons.cancel' | translate" + data-test-cancel-add-contributor-button > @@ -68,6 +70,7 @@ (click)="addContributor()" [label]="'common.buttons.next' | translate" [disabled]="!selectedUsers().length" + data-test-add-contributor-button > diff --git a/src/app/shared/components/contributors/add-unregistered-contributor-dialog/add-unregistered-contributor-dialog.component.html b/src/app/shared/components/contributors/add-unregistered-contributor-dialog/add-unregistered-contributor-dialog.component.html index a9b38a2ce..5251fecdb 100644 --- a/src/app/shared/components/contributors/add-unregistered-contributor-dialog/add-unregistered-contributor-dialog.component.html +++ b/src/app/shared/components/contributors/add-unregistered-contributor-dialog/add-unregistered-contributor-dialog.component.html @@ -28,7 +28,8 @@ class="btn-full-width md:w-auto" severity="secondary" [label]="'project.contributors.addDialog.addRegisteredContributor' | translate" - (click)="addRegistered()" + (onClick)="addRegistered()" + data-test-add-registered-contributor-button > @@ -37,18 +38,20 @@ diff --git a/src/app/shared/components/contributors/contributors-list/contributors-list.component.html b/src/app/shared/components/contributors/contributors-list/contributors-list.component.html index 4d53364a0..092308824 100644 --- a/src/app/shared/components/contributors/contributors-list/contributors-list.component.html +++ b/src/app/shared/components/contributors/contributors-list/contributors-list.component.html @@ -70,7 +70,7 @@

{{ 'project.contributors.bibliographicContributorInfo.heading' | translate } - @if (showCuratorColumn()) { + @if (showCurator()) {
{{ 'project.contributors.table.headers.curator' | translate }} @@ -85,8 +85,12 @@

{{ 'project.contributors.curatorInfo.heading' | translate }}

} - {{ 'project.contributors.table.headers.employment' | translate }} - {{ 'project.contributors.table.headers.education' | translate }} + @if (showEmployment()) { + {{ 'project.contributors.table.headers.employment' | translate }} + } + @if (showEducation()) { + {{ 'project.contributors.table.headers.education' | translate }} + } @@ -115,7 +119,7 @@

{{ 'project.contributors.curatorInfo.heading' | translate }}

- @if (showCuratorColumn()) { + @if (showCurator()) {
{{ 'project.contributors.curatorInfo.heading' | translate }}
} - - @if (contributor.employment?.length) { - - {{ 'project.contributors.employment.show' | translate }} - - } @else { - {{ 'project.contributors.employment.none' | translate }} - } - - -
- @if (contributor.education?.length) { + @if (showEmployment()) { + + @if (contributor.employment?.length) { - {{ 'project.contributors.education.show' | translate }} + {{ 'project.contributors.employment.show' | translate }} } @else { - {{ 'project.contributors.education.none' | translate }} + {{ 'project.contributors.employment.none' | translate }} } -
- + + } + @if (showEducation()) { + +
+ @if (contributor.education?.length) { + + {{ 'project.contributors.education.show' | translate }} + + } @else { + {{ 'project.contributors.education.none' | translate }} + } +
+ + } {{ 'project.contributors.curatorInfo.heading' | translate }} text [ariaLabel]="'common.buttons.delete' | translate" (onClick)="removeContributor(contributor)" + data-test-remove-contributor-button /> diff --git a/src/app/shared/components/contributors/contributors-list/contributors-list.component.spec.ts b/src/app/shared/components/contributors/contributors-list/contributors-list.component.spec.ts index d267bdbdf..9d043be2f 100644 --- a/src/app/shared/components/contributors/contributors-list/contributors-list.component.spec.ts +++ b/src/app/shared/components/contributors/contributors-list/contributors-list.component.spec.ts @@ -32,7 +32,7 @@ describe('ContributorsListComponent', () => { it('should have default values', () => { expect(component.contributors()).toEqual([]); expect(component.isLoading()).toBe(false); - expect(component.showCuratorColumn()).toBe(false); + expect(component.showCurator()).toBe(false); }); it('should accept contributors input', () => { @@ -54,7 +54,7 @@ describe('ContributorsListComponent', () => { fixture.componentRef.setInput('showCuratorColumn', true); fixture.detectChanges(); - expect(component.showCuratorColumn()).toBe(true); + expect(component.showCurator()).toBe(true); }); it('should have permissionsOptions defined', () => { @@ -97,7 +97,7 @@ describe('ContributorsListComponent', () => { fixture.componentRef.setInput('showCuratorColumn', true); fixture.detectChanges(); - expect(component.showCuratorColumn()).toBe(true); + expect(component.showCurator()).toBe(true); }); it('should handle all inputs together', () => { @@ -110,7 +110,7 @@ describe('ContributorsListComponent', () => { expect(component.contributors()).toEqual(contributors); expect(component.isLoading()).toBe(false); - expect(component.showCuratorColumn()).toBe(true); + expect(component.showCurator()).toBe(true); }); it('should handle empty contributors list', () => { diff --git a/src/app/shared/components/contributors/contributors-list/contributors-list.component.ts b/src/app/shared/components/contributors/contributors-list/contributors-list.component.ts index e0864a4fb..5202d25e1 100644 --- a/src/app/shared/components/contributors/contributors-list/contributors-list.component.ts +++ b/src/app/shared/components/contributors/contributors-list/contributors-list.component.ts @@ -28,7 +28,9 @@ import { SelectComponent } from '../../select/select.component'; export class ContributorsListComponent { contributors = input([]); isLoading = input(false); - showCuratorColumn = input(false); + showCurator = input(false); + showEducation = input(true); + showEmployment = input(true); remove = output(); diff --git a/src/app/shared/components/sub-header/sub-header.component.html b/src/app/shared/components/sub-header/sub-header.component.html index c11b83ec6..32b73bcf6 100644 --- a/src/app/shared/components/sub-header/sub-header.component.html +++ b/src/app/shared/components/sub-header/sub-header.component.html @@ -31,6 +31,7 @@

(onClick)="buttonClick.emit()" [loading]="isSubmitting()" [disabled]="isButtonDisabled()" + data-test-sub-header-button > } From 206e731bb0dd36fd71487a0d4e3f999c50592d10 Mon Sep 17 00:00:00 2001 From: nsemets Date: Fri, 12 Sep 2025 13:27:24 +0300 Subject: [PATCH 3/4] fix(accessibility): added aria labels and data test attributes --- .../metadata-funding/metadata-funding.component.html | 2 +- .../metadata-resource-information.component.html | 1 + .../resource-information-dialog.component.html | 2 ++ .../contributors-list/contributors-list.component.html | 8 +++++++- .../components/copy-button/copy-button.component.html | 3 ++- .../components/copy-button/copy-button.component.ts | 1 + .../shared/components/subjects/subjects.component.html | 2 ++ src/assets/i18n/en.json | 3 ++- 8 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/app/features/metadata/components/metadata-funding/metadata-funding.component.html b/src/app/features/metadata/components/metadata-funding/metadata-funding.component.html index 2de52f798..c64fd3d8f 100644 --- a/src/app/features/metadata/components/metadata-funding/metadata-funding.component.html +++ b/src/app/features/metadata/components/metadata-funding/metadata-funding.component.html @@ -27,7 +27,7 @@

{{ 'project.overview.metadata.fundingSupport' | translate }}

@if (funder.awardUri) {

{{ 'files.detail.resourceMetadata.fields.awardUri' | translate }}: - + {{ funder.awardUri }}

diff --git a/src/app/features/metadata/components/metadata-resource-information/metadata-resource-information.component.html b/src/app/features/metadata/components/metadata-resource-information/metadata-resource-information.component.html index e18e32d09..12971a7be 100644 --- a/src/app/features/metadata/components/metadata-resource-information/metadata-resource-information.component.html +++ b/src/app/features/metadata/components/metadata-resource-information/metadata-resource-information.component.html @@ -7,6 +7,7 @@

severity="secondary" text (onClick)="showResourceInfo.emit()" + [ariaLabel]="'project.metadata.resourceInformation.tooltipDialog.header' | translate" >

diff --git a/src/app/features/metadata/dialogs/resource-information-dialog/resource-information-dialog.component.html b/src/app/features/metadata/dialogs/resource-information-dialog/resource-information-dialog.component.html index 4ee45406b..70904f377 100644 --- a/src/app/features/metadata/dialogs/resource-information-dialog/resource-information-dialog.component.html +++ b/src/app/features/metadata/dialogs/resource-information-dialog/resource-information-dialog.component.html @@ -13,6 +13,7 @@ [placeholder]="'common.buttons.select' | translate" appendTo="body" class="w-full" + data-test-select-resource-type /> @@ -32,6 +33,7 @@ [placeholder]="'common.buttons.select' | translate" appendTo="body" class="w-full" + data-test-select-resource-language > {{ option.label }} diff --git a/src/app/shared/components/contributors/contributors-list/contributors-list.component.html b/src/app/shared/components/contributors/contributors-list/contributors-list.component.html index 092308824..62e4ea59f 100644 --- a/src/app/shared/components/contributors/contributors-list/contributors-list.component.html +++ b/src/app/shared/components/contributors/contributors-list/contributors-list.component.html @@ -116,7 +116,12 @@

{{ 'project.contributors.curatorInfo.heading' | translate }}

- +
@if (showCurator()) { @@ -127,6 +132,7 @@

{{ 'project.contributors.curatorInfo.heading' | translate }}

binary="true" [ngModel]="contributor.isCurator" [disabled]="true" + [ariaLabel]="'project.contributors.curatorInfo.heading' | translate" > diff --git a/src/app/shared/components/copy-button/copy-button.component.html b/src/app/shared/components/copy-button/copy-button.component.html index f426260cb..40d0f5c49 100644 --- a/src/app/shared/components/copy-button/copy-button.component.html +++ b/src/app/shared/components/copy-button/copy-button.component.html @@ -6,6 +6,7 @@ text [pTooltip]="(copyItem() ? tooltip() : 'common.labels.noData') | translate" [disabled]="!copyItem()" - (click)="copy()" + (onClick)="copy()" + [ariaLabel]="ariaLabel() | translate" > diff --git a/src/app/shared/components/copy-button/copy-button.component.ts b/src/app/shared/components/copy-button/copy-button.component.ts index 58f7b491e..da15a6240 100644 --- a/src/app/shared/components/copy-button/copy-button.component.ts +++ b/src/app/shared/components/copy-button/copy-button.component.ts @@ -21,6 +21,7 @@ export class CopyButtonComponent { tooltip = input('common.buttons.copy'); label = input(''); severity = input('contrast'); + ariaLabel = input('common.accessibility.copyButtonInfo'); private readonly clipboard = inject(Clipboard); private readonly toastService = inject(ToastService); diff --git a/src/app/shared/components/subjects/subjects.component.html b/src/app/shared/components/subjects/subjects.component.html index e02642187..862ae009e 100644 --- a/src/app/shared/components/subjects/subjects.component.html +++ b/src/app/shared/components/subjects/subjects.component.html @@ -1,5 +1,7 @@

{{ 'shared.subjects.title' | translate }}

+

{{ 'shared.subjects.description' | translate }}

+ @if (!selected().length) {

{{ 'shared.subjects.noSelected' | translate }}

diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index d64c6ed28..31123445a 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -64,7 +64,8 @@ "tooltipBtn": "Tooltip button", "customizeOptions": "Customize options", "toggleProjectVisibility": "Toggle project visibility", - "tagInput": "Tag input" + "tagInput": "Tag input", + "copyButtonInfo": "Copy to clipboard button" }, "dialogs": { "confirmation": "Confirmation" From 9e35924cb4dfbeb47589578182cf821769d65b5a Mon Sep 17 00:00:00 2001 From: nsemets Date: Fri, 12 Sep 2025 14:15:05 +0300 Subject: [PATCH 4/4] fix(test): fixed test --- .../features/home/pages/dashboard/dashboard.component.ts | 2 +- .../contributors-dialog.component.spec.ts | 3 ++- .../contributors-list/contributors-list.component.spec.ts | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/features/home/pages/dashboard/dashboard.component.ts b/src/app/features/home/pages/dashboard/dashboard.component.ts index 0ca0b649a..c0186cdc3 100644 --- a/src/app/features/home/pages/dashboard/dashboard.component.ts +++ b/src/app/features/home/pages/dashboard/dashboard.component.ts @@ -70,7 +70,7 @@ export class DashboardComponent implements OnInit { return this.projects().filter((project) => project.title.toLowerCase().includes(search)); }); - protected readonly existsProjects = computed(() => { + readonly existsProjects = computed(() => { return this.projects().length || !!this.searchControl.value?.length; }); diff --git a/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.spec.ts b/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.spec.ts index 5da51138a..162cfdc9f 100644 --- a/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.spec.ts +++ b/src/app/features/metadata/dialogs/contributors-dialog/contributors-dialog.component.spec.ts @@ -8,7 +8,7 @@ import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { MOCK_STORE, TranslateServiceMock } from '@osf/shared/mocks'; +import { MOCK_STORE, MockCustomConfirmationServiceProvider, TranslateServiceMock } from '@osf/shared/mocks'; import { ContributorsSelectors } from '@osf/shared/stores'; import { ContributorsDialogComponent } from './contributors-dialog.component'; @@ -26,6 +26,7 @@ describe('ContributorsDialogComponent', () => { imports: [ContributorsDialogComponent, MockPipe(TranslatePipe)], providers: [ TranslateServiceMock, + MockCustomConfirmationServiceProvider, MockProviders(MessageService, DynamicDialogRef, DynamicDialogConfig), MockProvider(Store, MOCK_STORE), ], diff --git a/src/app/shared/components/contributors/contributors-list/contributors-list.component.spec.ts b/src/app/shared/components/contributors/contributors-list/contributors-list.component.spec.ts index 9d043be2f..2fc1eef8b 100644 --- a/src/app/shared/components/contributors/contributors-list/contributors-list.component.spec.ts +++ b/src/app/shared/components/contributors/contributors-list/contributors-list.component.spec.ts @@ -50,8 +50,8 @@ describe('ContributorsListComponent', () => { expect(component.isLoading()).toBe(true); }); - it('should accept showCuratorColumn input', () => { - fixture.componentRef.setInput('showCuratorColumn', true); + it('should accept showCurator input', () => { + fixture.componentRef.setInput('showCurator', true); fixture.detectChanges(); expect(component.showCurator()).toBe(true); @@ -94,7 +94,7 @@ describe('ContributorsListComponent', () => { }); it('should handle curator column visibility', () => { - fixture.componentRef.setInput('showCuratorColumn', true); + fixture.componentRef.setInput('showCurator', true); fixture.detectChanges(); expect(component.showCurator()).toBe(true); @@ -105,7 +105,7 @@ describe('ContributorsListComponent', () => { fixture.componentRef.setInput('contributors', contributors); fixture.componentRef.setInput('isLoading', false); - fixture.componentRef.setInput('showCuratorColumn', true); + fixture.componentRef.setInput('showCurator', true); fixture.detectChanges(); expect(component.contributors()).toEqual(contributors);