Merge branch 'w2p-117573_remove-observable-function-calls-from-template-7.6' into dspace-7_x

# Conflicts:
#	src/app/access-control/epeople-registry/epeople-registry.component.html
#	src/app/access-control/epeople-registry/epeople-registry.component.ts
#	src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html
#	src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts
#	src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts
#	src/app/access-control/group-registry/group-form/group-form.component.html
#	src/app/access-control/group-registry/group-form/group-form.component.ts
#	src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.html
#	src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts
#	src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts
#	src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html
#	src/app/admin/admin-registries/metadata-schema/metadata-schema.component.ts
#	src/app/shared/pagination/pagination.component.ts
This commit is contained in:
Alexandre Vryghem
2024-12-06 16:58:01 +01:00
26 changed files with 881 additions and 898 deletions

View File

@@ -16,8 +16,7 @@ import { NotificationsServiceStub } from '../../../shared/testing/notifications-
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
import { BitstreamFormatSupportLevel } from '../../../core/shared/bitstream-format-support-level';
import { XSRFService } from '../../../core/xsrf/xsrf.service';
import { cold, getTestScheduler, hot } from 'jasmine-marbles';
import { TestScheduler } from 'rxjs/testing';
import { hot } from 'jasmine-marbles';
import {
createNoContentRemoteDataObject$,
createSuccessfulRemoteDataObject,
@@ -32,7 +31,6 @@ describe('BitstreamFormatsComponent', () => {
let comp: BitstreamFormatsComponent;
let fixture: ComponentFixture<BitstreamFormatsComponent>;
let bitstreamFormatService;
let scheduler: TestScheduler;
let notificationsServiceStub;
let paginationService;
@@ -87,8 +85,6 @@ describe('BitstreamFormatsComponent', () => {
const initAsync = () => {
notificationsServiceStub = new NotificationsServiceStub();
scheduler = getTestScheduler();
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
findAll: observableOf(mockFormatsRD),
find: createSuccessfulRemoteDataObject$(mockFormatsList[0]),
@@ -180,17 +176,17 @@ describe('BitstreamFormatsComponent', () => {
beforeEach(waitForAsync(initAsync));
beforeEach(initBeforeEach);
it('should return an observable of true if the provided bistream is in the list returned by the service', () => {
const result = comp.isSelected(bitstreamFormat1);
expect(result).toBeObservable(cold('b', { b: true }));
comp.selectedBitstreamFormatIDs().subscribe((selectedBitstreamFormatIDs: string[]) => {
expect(selectedBitstreamFormatIDs).toContain(bitstreamFormat1.id);
});
});
it('should return an observable of false if the provided bistream is not in the list returned by the service', () => {
const format = new BitstreamFormat();
format.uuid = 'new';
const result = comp.isSelected(format);
expect(result).toBeObservable(cold('b', { b: false }));
comp.selectedBitstreamFormatIDs().subscribe((selectedBitstreamFormatIDs: string[]) => {
expect(selectedBitstreamFormatIDs).not.toContain(format.id);
});
});
});
@@ -216,8 +212,6 @@ describe('BitstreamFormatsComponent', () => {
beforeEach(waitForAsync(() => {
notificationsServiceStub = new NotificationsServiceStub();
scheduler = getTestScheduler();
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
findAll: observableOf(mockFormatsRD),
find: createSuccessfulRemoteDataObject$(mockFormatsList[0]),
@@ -265,8 +259,6 @@ describe('BitstreamFormatsComponent', () => {
beforeEach(waitForAsync(() => {
notificationsServiceStub = new NotificationsServiceStub();
scheduler = getTestScheduler();
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
findAll: observableOf(mockFormatsRD),
find: createSuccessfulRemoteDataObject$(mockFormatsList[0]),