diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3b7aff6897..dabc0b428e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: DSPACE_UI_HOST: 127.0.0.1 # When Chrome version is specified, we pin to a specific version of Chrome # Comment this out to use the latest release - #CHROME_VERSION: "90.0.4430.212-1" + CHROME_VERSION: "116.0.5845.187-1" strategy: # Create a matrix of Node versions to test against (in parallel) matrix: diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml new file mode 100644 index 00000000000..5cdc81bfd51 --- /dev/null +++ b/bitbucket-pipelines.yml @@ -0,0 +1,27 @@ +options: + runs-on: ubuntu-latest + +definitions: + steps: + - step: &unittest-code-checks + name: test-code-checks + image: + name: cypress/browsers:node18.12.0-chrome107 + run-as-user: 1000 + size: 2x + caches: + - node + script: + - yarn install --frozen-lockfile + - yarn run lint --quiet + - yarn run check-circ-deps + - yarn run build:prod + - yarn run test:headless + +pipelines: + branches: + 'dspace-cris-7': + - step: *unittest-code-checks + pull-requests: + '**': + - step: *unittest-code-checks diff --git a/package.json b/package.json index c85516b4020..a80ad477a35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dspace-angular", - "version": "2023.01.01-SNAPSHOT", + "version": "2023.02.00-SNAPSHOT", "scripts": { "ng": "ng", "config:watch": "nodemon", diff --git a/src/app/access-control/epeople-registry/epeople-registry.component.spec.ts b/src/app/access-control/epeople-registry/epeople-registry.component.spec.ts index c0d70fd0b25..c3a6fc8bbce 100644 --- a/src/app/access-control/epeople-registry/epeople-registry.component.spec.ts +++ b/src/app/access-control/epeople-registry/epeople-registry.component.spec.ts @@ -27,6 +27,8 @@ import { RequestService } from '../../core/data/request.service'; import { PaginationService } from '../../core/pagination/pagination.service'; import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub'; import { FindListOptions } from '../../core/data/find-list-options.model'; +import { UUIDService } from '../../core/shared/uuid.service'; +import { getMockUUIDService } from '../../shared/mocks/uuid.service.mock'; describe('EPeopleRegistryComponent', () => { let component: EPeopleRegistryComponent; @@ -138,7 +140,8 @@ describe('EPeopleRegistryComponent', () => { { provide: FormBuilderService, useValue: builderService }, { provide: Router, useValue: new RouterStub() }, { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) }, - { provide: PaginationService, useValue: paginationService } + { provide: PaginationService, useValue: paginationService }, + { provide: UUIDService, useValue: getMockUUIDService() } ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents(); diff --git a/src/app/access-control/epeople-registry/epeople-registry.component.ts b/src/app/access-control/epeople-registry/epeople-registry.component.ts index 55233d8173d..f600fef0b23 100644 --- a/src/app/access-control/epeople-registry/epeople-registry.component.ts +++ b/src/app/access-control/epeople-registry/epeople-registry.component.ts @@ -21,6 +21,7 @@ import { RequestService } from '../../core/data/request.service'; import { PageInfo } from '../../core/shared/page-info.model'; import { NoContent } from '../../core/shared/NoContent.model'; import { PaginationService } from '../../core/pagination/pagination.service'; +import { UUIDService } from '../../core/shared/uuid.service'; @Component({ selector: 'ds-epeople-registry', @@ -58,7 +59,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { * Pagination config used to display the list of epeople */ config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { - id: 'elp', + id: this.uuidService.generate(), pageSize: 5, currentPage: 1 }); @@ -93,6 +94,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { private router: Router, private modalService: NgbModal, private paginationService: PaginationService, + private uuidService: UUIDService, public requestService: RequestService) { this.currentSearchQuery = ''; this.currentSearchScope = 'metadata'; diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts index bd87d924772..64217b1410f 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts @@ -31,6 +31,8 @@ import { PaginationServiceStub } from '../../../shared/testing/pagination-servic import { FindListOptions } from '../../../core/data/find-list-options.model'; import { ValidateEmailNotTaken } from './validators/email-taken.validator'; import { EpersonRegistrationService } from '../../../core/data/eperson-registration.service'; +import { UUIDService } from '../../../core/shared/uuid.service'; +import { getMockUUIDService } from '../../../shared/mocks/uuid.service.mock'; describe('EPersonFormComponent', () => { let component: EPersonFormComponent; @@ -207,6 +209,7 @@ describe('EPersonFormComponent', () => { { provide: PaginationService, useValue: paginationService }, { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring'])}, { provide: EpersonRegistrationService, useValue: epersonRegistrationService }, + { provide: UUIDService, useValue: getMockUUIDService() }, EPeopleRegistryComponent ], schemas: [NO_ERRORS_SCHEMA] diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts index c4194473c3d..7e24d76d82b 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts @@ -37,6 +37,7 @@ import { ValidateEmailNotTaken } from './validators/email-taken.validator'; import { Registration } from '../../../core/shared/registration.model'; import { EpersonRegistrationService } from '../../../core/data/eperson-registration.service'; import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email-form.component'; +import { UUIDService } from '../../../core/shared/uuid.service'; @Component({ selector: 'ds-eperson-form', @@ -150,7 +151,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy { * Pagination config used to display the list of groups */ config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { - id: 'gem', + id: this.uuidService.generate(), pageSize: 5, currentPage: 1 }); @@ -183,6 +184,7 @@ export class EPersonFormComponent implements OnInit, OnDestroy { private paginationService: PaginationService, public requestService: RequestService, private epersonRegistrationService: EpersonRegistrationService, + private uuidService: UUIDService ) { this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => { this.epersonInitial = eperson; diff --git a/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts b/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts index b7536177cdf..e2ecd2e4548 100644 --- a/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts +++ b/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts @@ -28,6 +28,8 @@ import { NotificationsServiceStub } from '../../../../shared/testing/notificatio import { RouterMock } from '../../../../shared/mocks/router.mock'; import { PaginationService } from '../../../../core/pagination/pagination.service'; import { PaginationServiceStub } from '../../../../shared/testing/pagination-service.stub'; +import { UUIDService } from '../../../../core/shared/uuid.service'; +import { getMockUUIDService } from '../../../../shared/mocks/uuid.service.mock'; describe('MembersListComponent', () => { let component: MembersListComponent; @@ -135,6 +137,7 @@ describe('MembersListComponent', () => { { provide: FormBuilderService, useValue: builderService }, { provide: Router, useValue: new RouterMock() }, { provide: PaginationService, useValue: paginationService }, + { provide: UUIDService, useValue: getMockUUIDService() } ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents(); diff --git a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts index 58d252f0b4a..81fd511d4a6 100644 --- a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts +++ b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts @@ -27,6 +27,7 @@ import { NotificationsService } from '../../../../shared/notifications/notificat import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model'; import { EpersonDtoModel } from '../../../../core/eperson/models/eperson-dto.model'; import { PaginationService } from '../../../../core/pagination/pagination.service'; +import { UUIDService } from '../../../../core/shared/uuid.service'; /** * Keys to keep track of specific subscriptions @@ -105,7 +106,7 @@ export class MembersListComponent implements OnInit, OnDestroy { * Pagination config used to display the list of EPeople that are result of EPeople search */ configSearch: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { - id: 'sml', + id: this.uuidService.generate(), pageSize: 5, currentPage: 1 }); @@ -113,7 +114,7 @@ export class MembersListComponent implements OnInit, OnDestroy { * Pagination config used to display the list of EPerson Membes of active group being edited */ config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { - id: 'ml', + id: this.uuidService.generate(), pageSize: 5, currentPage: 1 }); @@ -143,7 +144,8 @@ export class MembersListComponent implements OnInit, OnDestroy { protected notificationsService: NotificationsService, protected formBuilder: FormBuilder, protected paginationService: PaginationService, - private router: Router + private router: Router, + protected uuidService: UUIDService ) { this.currentSearchQuery = ''; this.currentSearchScope = 'metadata'; diff --git a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts index 1ca6c88c5f7..bd7e543a218 100644 --- a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts +++ b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts @@ -37,6 +37,8 @@ import { NotificationsServiceStub } from '../../../../shared/testing/notificatio import { map } from 'rxjs/operators'; import { PaginationService } from '../../../../core/pagination/pagination.service'; import { PaginationServiceStub } from '../../../../shared/testing/pagination-service.stub'; +import { UUIDService } from '../../../../core/shared/uuid.service'; +import { getMockUUIDService } from '../../../../shared/mocks/uuid.service.mock'; describe('SubgroupsListComponent', () => { let component: SubgroupsListComponent; @@ -121,6 +123,7 @@ describe('SubgroupsListComponent', () => { { provide: FormBuilderService, useValue: builderService }, { provide: Router, useValue: routerStub }, { provide: PaginationService, useValue: paginationService }, + { provide: UUIDService, useValue: getMockUUIDService() } ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents(); diff --git a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts index 5f1700e07d5..cbe230c2676 100644 --- a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts +++ b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts @@ -18,6 +18,7 @@ import { PaginationComponentOptions } from '../../../../shared/pagination/pagina import { NoContent } from '../../../../core/shared/NoContent.model'; import { PaginationService } from '../../../../core/pagination/pagination.service'; import { followLink } from '../../../../shared/utils/follow-link-config.model'; +import { UUIDService } from '../../../../core/shared/uuid.service'; /** * Keys to keep track of specific subscriptions @@ -58,7 +59,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy { * Pagination config used to display the list of groups that are result of groups search */ configSearch: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { - id: 'ssgl', + id: this.uuidService.generate(), pageSize: 5, currentPage: 1 }); @@ -66,7 +67,7 @@ export class SubgroupsListComponent implements OnInit, OnDestroy { * Pagination config used to display the list of subgroups of currently active group being edited */ config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { - id: 'sgl', + id: this.uuidService.generate(), pageSize: 5, currentPage: 1 }); @@ -88,7 +89,8 @@ export class SubgroupsListComponent implements OnInit, OnDestroy { private notificationsService: NotificationsService, private formBuilder: FormBuilder, private paginationService: PaginationService, - private router: Router) { + private router: Router, + private uuidService: UUIDService) { this.currentSearchQuery = ''; } diff --git a/src/app/access-control/group-registry/groups-registry.component.spec.ts b/src/app/access-control/group-registry/groups-registry.component.spec.ts index 239939e70d8..b421d950e1f 100644 --- a/src/app/access-control/group-registry/groups-registry.component.spec.ts +++ b/src/app/access-control/group-registry/groups-registry.component.spec.ts @@ -32,6 +32,8 @@ import { PaginationService } from '../../core/pagination/pagination.service'; import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub'; import { FeatureID } from '../../core/data/feature-authorization/feature-id'; import { NoContent } from '../../core/shared/NoContent.model'; +import { UUIDService } from '../../core/shared/uuid.service'; +import { getMockUUIDService } from '../../shared/mocks/uuid.service.mock'; describe('GroupRegistryComponent', () => { let component: GroupsRegistryComponent; @@ -179,7 +181,8 @@ describe('GroupRegistryComponent', () => { { provide: Router, useValue: new RouterMock() }, { provide: AuthorizationDataService, useValue: authorizationService }, { provide: PaginationService, useValue: paginationService }, - { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) } + { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) }, + { provide: UUIDService, useValue: getMockUUIDService() } ], schemas: [NO_ERRORS_SCHEMA] }).compileComponents(); diff --git a/src/app/access-control/group-registry/groups-registry.component.ts b/src/app/access-control/group-registry/groups-registry.component.ts index 70c9b22852f..62c14309366 100644 --- a/src/app/access-control/group-registry/groups-registry.component.ts +++ b/src/app/access-control/group-registry/groups-registry.component.ts @@ -37,6 +37,7 @@ import { PaginationComponentOptions } from '../../shared/pagination/pagination-c import { NoContent } from '../../core/shared/NoContent.model'; import { PaginationService } from '../../core/pagination/pagination.service'; import { followLink } from '../../shared/utils/follow-link-config.model'; +import { UUIDService } from '../../core/shared/uuid.service'; @Component({ selector: 'ds-groups-registry', @@ -54,7 +55,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy { * Pagination config used to display the list of groups */ config: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { - id: 'gl', + id: this.uuidService.generate(), pageSize: 5, currentPage: 1 }); @@ -104,6 +105,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy { private router: Router, private authorizationService: AuthorizationDataService, private paginationService: PaginationService, + private uuidService: UUIDService, public requestService: RequestService) { this.currentSearchQuery = ''; this.searchForm = this.formBuilder.group(({ diff --git a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts index 8a44240b7e2..cda9a67fc47 100644 --- a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts +++ b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts @@ -26,6 +26,8 @@ import { import { createPaginatedList } from '../../../shared/testing/utils.test'; import { PaginationService } from '../../../core/pagination/pagination.service'; import { PaginationServiceStub } from '../../../shared/testing/pagination-service.stub'; +import { UUIDService } from '../../../core/shared/uuid.service'; +import { getMockUUIDService } from '../../../shared/mocks/uuid.service.mock'; describe('BitstreamFormatsComponent', () => { let comp: BitstreamFormatsComponent; @@ -108,7 +110,8 @@ describe('BitstreamFormatsComponent', () => { { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: NotificationsService, useValue: notificationsServiceStub }, - { provide: PaginationService, useValue: paginationService } + { provide: PaginationService, useValue: paginationService }, + { provide: UUIDService, useValue: getMockUUIDService() } ] }).compileComponents(); }; @@ -236,7 +239,8 @@ describe('BitstreamFormatsComponent', () => { { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: NotificationsService, useValue: notificationsServiceStub }, - { provide: PaginationService, useValue: paginationService } + { provide: PaginationService, useValue: paginationService }, + { provide: UUIDService, useValue: getMockUUIDService() } ] }).compileComponents(); } @@ -285,7 +289,8 @@ describe('BitstreamFormatsComponent', () => { { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: NotificationsService, useValue: notificationsServiceStub }, - { provide: PaginationService, useValue: paginationService } + { provide: PaginationService, useValue: paginationService }, + { provide: UUIDService, useValue: getMockUUIDService() } ] }).compileComponents(); } diff --git a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts index 162bf2bdb28..022193cdbee 100644 --- a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts +++ b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts @@ -13,6 +13,7 @@ import { NoContent } from '../../../core/shared/NoContent.model'; import { PaginationService } from '../../../core/pagination/pagination.service'; import { FindListOptions } from '../../../core/data/find-list-options.model'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; +import { UUIDService } from '../../../core/shared/uuid.service'; /** * This component renders a list of bitstream formats @@ -33,7 +34,7 @@ export class BitstreamFormatsComponent implements OnInit, OnDestroy { * Currently simply renders all bitstream formats */ pageConfig: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { - id: 'rbp', + id: this.uuidService.generate(), pageSize: 20, pageSizeOptions: [20, 40, 60, 80, 100] }); @@ -43,6 +44,7 @@ export class BitstreamFormatsComponent implements OnInit, OnDestroy { private translateService: TranslateService, private bitstreamFormatService: BitstreamFormatDataService, private paginationService: PaginationService, + private uuidService: UUIDService ) { } diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.html b/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.html index 771f18ba4b5..fde93042e09 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.html +++ b/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.html @@ -23,6 +23,11 @@
+ {{ 'external-login-validation.review-account-info.table.header.information' | translate }} + | ++ {{'external-login-validation.review-account-info.table.header.received-value' | translate }} + | ++ {{'external-login-validation.review-account-info.table.header.current-value' | translate }} + | +{{'external-login-validation.review-account-info.table.header.action' | translate }} | +
---|---|---|---|
{{ registrationData.registrationType }} | +{{ registrationData.netId }} | ++ + {{ notApplicableText }} + + | ++ |
{{ data.label | titlecase }} | +{{ data.receivedValue }} | ++ + + | +
+ |
+