ESLint: fix object-curly-spacing

This commit is contained in:
Yury Bondarenko
2023-06-27 17:29:40 +02:00
parent 436a4d7645
commit 0633460107
280 changed files with 765 additions and 765 deletions

View File

@@ -135,7 +135,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy {
initialisePage() { initialisePage() {
this.searching$.next(true); this.searching$.next(true);
this.isEPersonFormShown = false; this.isEPersonFormShown = false;
this.search({scope: this.currentSearchScope, query: this.currentSearchQuery}); this.search({ scope: this.currentSearchScope, query: this.currentSearchQuery });
this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => { this.subs.push(this.epersonService.getActiveEPerson().subscribe((eperson: EPerson) => {
if (eperson != null && eperson.id) { if (eperson != null && eperson.id) {
this.isEPersonFormShown = true; this.isEPersonFormShown = true;
@@ -260,7 +260,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy {
if (hasValue(ePerson.id)) { if (hasValue(ePerson.id)) {
this.epersonService.deleteEPerson(ePerson).pipe(getFirstCompletedRemoteData()).subscribe((restResponse: RemoteData<NoContent>) => { this.epersonService.deleteEPerson(ePerson).pipe(getFirstCompletedRemoteData()).subscribe((restResponse: RemoteData<NoContent>) => {
if (restResponse.hasSucceeded) { if (restResponse.hasSucceeded) {
this.notificationsService.success(this.translateService.get(this.labelPrefix + 'notification.deleted.success', {name: this.dsoNameService.getName(ePerson)})); this.notificationsService.success(this.translateService.get(this.labelPrefix + 'notification.deleted.success', { name: this.dsoNameService.getName(ePerson) }));
} else { } else {
this.notificationsService.error('Error occured when trying to delete EPerson with id: ' + ePerson.id + ' with code: ' + restResponse.statusCode + ' and message: ' + restResponse.errorMessage); this.notificationsService.error('Error occured when trying to delete EPerson with id: ' + ePerson.id + ' with code: ' + restResponse.statusCode + ' and message: ' + restResponse.errorMessage);
} }
@@ -301,7 +301,7 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy {
this.searchForm.patchValue({ this.searchForm.patchValue({
query: '', query: '',
}); });
this.search({query: ''}); this.search({ query: '' });
} }
/** /**

View File

@@ -226,7 +226,7 @@ describe('EPersonFormComponent', () => {
{ provide: AuthService, useValue: authService }, { provide: AuthService, useValue: authService },
{ provide: AuthorizationDataService, useValue: authorizationService }, { provide: AuthorizationDataService, useValue: authorizationService },
{ provide: PaginationService, useValue: paginationService }, { provide: PaginationService, useValue: paginationService },
{ provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring'])}, { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) },
{ provide: EpersonRegistrationService, useValue: epersonRegistrationService }, { provide: EpersonRegistrationService, useValue: epersonRegistrationService },
EPeopleRegistryComponent, EPeopleRegistryComponent,
], ],

View File

@@ -549,10 +549,10 @@ export class EPersonFormComponent implements OnInit, OnDestroy {
.subscribe((response: RemoteData<Registration>) => { .subscribe((response: RemoteData<Registration>) => {
if (response.hasSucceeded) { if (response.hasSucceeded) {
this.notificationsService.success(this.translateService.get('admin.access-control.epeople.actions.reset'), this.notificationsService.success(this.translateService.get('admin.access-control.epeople.actions.reset'),
this.translateService.get('forgot-email.form.success.content', {email: this.epersonInitial.email})); this.translateService.get('forgot-email.form.success.content', { email: this.epersonInitial.email }));
} else { } else {
this.notificationsService.error(this.translateService.get('forgot-email.form.error.head'), this.notificationsService.error(this.translateService.get('forgot-email.form.error.head'),
this.translateService.get('forgot-email.form.error.content', {email: this.epersonInitial.email})); this.translateService.get('forgot-email.form.error.content', { email: this.epersonInitial.email }));
} }
}, },
); );

View File

@@ -3,7 +3,7 @@ import {
ValidationErrors, ValidationErrors,
} from '@angular/forms'; } from '@angular/forms';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { map} from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { GroupDataService } from '../../../../core/eperson/group-data.service'; import { GroupDataService } from '../../../../core/eperson/group-data.service';
import { Group } from '../../../../core/eperson/models/group.model'; import { Group } from '../../../../core/eperson/models/group.model';

View File

@@ -54,7 +54,7 @@ describe('GroupPageGuard', () => {
it('should return true', (done) => { it('should return true', (done) => {
guard.canActivate( guard.canActivate(
routeSnapshotWithGroupId, { url: 'current-url'} as any, routeSnapshotWithGroupId, { url: 'current-url' } as any,
).subscribe((result) => { ).subscribe((result) => {
expect(authorizationService.isAuthorized).toHaveBeenCalledWith( expect(authorizationService.isAuthorized).toHaveBeenCalledWith(
FeatureID.CanManageGroup, groupEndpointUrl, undefined, FeatureID.CanManageGroup, groupEndpointUrl, undefined,
@@ -72,7 +72,7 @@ describe('GroupPageGuard', () => {
it('should not return true', (done) => { it('should not return true', (done) => {
guard.canActivate( guard.canActivate(
routeSnapshotWithGroupId, { url: 'current-url'} as any, routeSnapshotWithGroupId, { url: 'current-url' } as any,
).subscribe((result) => { ).subscribe((result) => {
expect(authorizationService.isAuthorized).toHaveBeenCalledWith( expect(authorizationService.isAuthorized).toHaveBeenCalledWith(
FeatureID.CanManageGroup, groupEndpointUrl, undefined, FeatureID.CanManageGroup, groupEndpointUrl, undefined,

View File

@@ -147,7 +147,7 @@ export class GroupsRegistryComponent implements OnInit, OnDestroy {
const query: string = data.query; const query: string = data.query;
if (query != null && this.currentSearchQuery !== query) { if (query != null && this.currentSearchQuery !== query) {
this.currentSearchQuery = query; this.currentSearchQuery = query;
this.paginationService.updateRouteWithUrl(this.config.id, [], {page: 1}); this.paginationService.updateRouteWithUrl(this.config.id, [], { page: 1 });
} }
return this.groupService.searchGroups(this.currentSearchQuery.trim(), { return this.groupService.searchGroups(this.currentSearchQuery.trim(), {
currentPage: paginationOptions.currentPage, currentPage: paginationOptions.currentPage,

View File

@@ -12,7 +12,7 @@ import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.compo
{ {
path: 'metadata', path: 'metadata',
resolve: { breadcrumb: I18nBreadcrumbResolver }, resolve: { breadcrumb: I18nBreadcrumbResolver },
data: {title: 'admin.registries.metadata.title', breadcrumbKey: 'admin.registries.metadata'}, data: { title: 'admin.registries.metadata.title', breadcrumbKey: 'admin.registries.metadata' },
children: [ children: [
{ {
path: '', path: '',
@@ -22,7 +22,7 @@ import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.compo
path: ':schemaName', path: ':schemaName',
resolve: { breadcrumb: I18nBreadcrumbResolver }, resolve: { breadcrumb: I18nBreadcrumbResolver },
component: MetadataSchemaComponent, component: MetadataSchemaComponent,
data: {title: 'admin.registries.schema.title', breadcrumbKey: 'admin.registries.schema'}, data: { title: 'admin.registries.schema.title', breadcrumbKey: 'admin.registries.schema' },
}, },
], ],
}, },
@@ -31,7 +31,7 @@ import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.compo
resolve: { breadcrumb: I18nBreadcrumbResolver }, resolve: { breadcrumb: I18nBreadcrumbResolver },
loadChildren: () => import('./bitstream-formats/bitstream-formats.module') loadChildren: () => import('./bitstream-formats/bitstream-formats.module')
.then((m) => m.BitstreamFormatsModule), .then((m) => m.BitstreamFormatsModule),
data: {title: 'admin.registries.bitstream-formats.title', breadcrumbKey: 'admin.registries.bitstream-formats'}, data: { title: 'admin.registries.bitstream-formats.title', breadcrumbKey: 'admin.registries.bitstream-formats' },
}, },
]), ]),
], ],

View File

@@ -21,7 +21,7 @@ const BITSTREAMFORMAT_ADD_PATH = 'add';
path: BITSTREAMFORMAT_ADD_PATH, path: BITSTREAMFORMAT_ADD_PATH,
resolve: { breadcrumb: I18nBreadcrumbResolver }, resolve: { breadcrumb: I18nBreadcrumbResolver },
component: AddBitstreamFormatComponent, component: AddBitstreamFormatComponent,
data: {breadcrumbKey: 'admin.registries.bitstream-formats.create'}, data: { breadcrumbKey: 'admin.registries.bitstream-formats.create' },
}, },
{ {
path: BITSTREAMFORMAT_EDIT_PATH, path: BITSTREAMFORMAT_EDIT_PATH,
@@ -30,7 +30,7 @@ const BITSTREAMFORMAT_ADD_PATH = 'add';
bitstreamFormat: BitstreamFormatsResolver, bitstreamFormat: BitstreamFormatsResolver,
breadcrumb: I18nBreadcrumbResolver, breadcrumb: I18nBreadcrumbResolver,
}, },
data: {breadcrumbKey: 'admin.registries.bitstream-formats.edit'}, data: { breadcrumbKey: 'admin.registries.bitstream-formats.edit' },
}, },
]), ]),
], ],

View File

@@ -141,7 +141,7 @@ export class BitstreamFormatsComponent implements OnInit, OnDestroy {
const messages = observableCombineLatest( const messages = observableCombineLatest(
this.translateService.get(`${prefix}.${suffix}.head`), this.translateService.get(`${prefix}.${suffix}.head`),
this.translateService.get(`${prefix}.${suffix}.amount`, {amount: amount}), this.translateService.get(`${prefix}.${suffix}.amount`, { amount: amount }),
); );
messages.subscribe(([head, content]) => { messages.subscribe(([head, content]) => {

View File

@@ -50,9 +50,9 @@ export class FormatFormComponent implements OnInit {
/** /**
* The different supported support level of the bitstream format * The different supported support level of the bitstream format
*/ */
supportLevelOptions = [{label: BitstreamFormatSupportLevel.Known, value: BitstreamFormatSupportLevel.Known}, supportLevelOptions = [{ label: BitstreamFormatSupportLevel.Known, value: BitstreamFormatSupportLevel.Known },
{label: BitstreamFormatSupportLevel.Unknown, value: BitstreamFormatSupportLevel.Unknown}, { label: BitstreamFormatSupportLevel.Unknown, value: BitstreamFormatSupportLevel.Unknown },
{label: BitstreamFormatSupportLevel.Supported, value: BitstreamFormatSupportLevel.Supported}]; { label: BitstreamFormatSupportLevel.Supported, value: BitstreamFormatSupportLevel.Supported }];
/** /**
* Styling element for repeatable field * Styling element for repeatable field

View File

@@ -173,7 +173,7 @@ export class MetadataRegistryComponent {
const suffix = success ? 'success' : 'failure'; const suffix = success ? 'success' : 'failure';
const messages = observableCombineLatest( const messages = observableCombineLatest(
this.translateService.get(success ? `${prefix}.${suffix}` : `${prefix}.${suffix}`), this.translateService.get(success ? `${prefix}.${suffix}` : `${prefix}.${suffix}`),
this.translateService.get(`${prefix}.deleted.${suffix}`, {amount: amount}), this.translateService.get(`${prefix}.deleted.${suffix}`, { amount: amount }),
); );
messages.subscribe(([head, content]) => { messages.subscribe(([head, content]) => {
if (success) { if (success) {

View File

@@ -52,7 +52,7 @@ import { AdminWorkflowPageComponent } from './admin-workflow-page/admin-workflow
path: 'system-wide-alert', path: 'system-wide-alert',
resolve: { breadcrumb: I18nBreadcrumbResolver }, resolve: { breadcrumb: I18nBreadcrumbResolver },
loadChildren: () => import('../system-wide-alert/system-wide-alert.module').then((m) => m.SystemWideAlertModule), loadChildren: () => import('../system-wide-alert/system-wide-alert.module').then((m) => m.SystemWideAlertModule),
data: {title: 'admin.system-wide-alert.title', breadcrumbKey: 'admin.system-wide-alert'}, data: { title: 'admin.system-wide-alert.title', breadcrumbKey: 'admin.system-wide-alert' },
}, },
]), ]),
], ],

View File

@@ -44,7 +44,7 @@ export class AdminSearchModule {
static withEntryComponents() { static withEntryComponents() {
return { return {
ngModule: SharedModule, ngModule: SharedModule,
providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })),
}; };
} }
} }

View File

@@ -28,9 +28,9 @@ describe('AdminSidebarSectionComponent', () => {
imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()], imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()],
declarations: [AdminSidebarSectionComponent, TestComponent], declarations: [AdminSidebarSectionComponent, TestComponent],
providers: [ providers: [
{provide: 'sectionDataProvider', useValue: {model: {link: 'google.com'}, icon: iconString}}, { provide: 'sectionDataProvider', useValue: { model: { link: 'google.com' }, icon: iconString } },
{provide: MenuService, useValue: menuService}, { provide: MenuService, useValue: menuService },
{provide: CSSVariableService, useClass: CSSVariableServiceStub}, { provide: CSSVariableService, useClass: CSSVariableServiceStub },
], ],
}).overrideComponent(AdminSidebarSectionComponent, { }).overrideComponent(AdminSidebarSectionComponent, {
set: { set: {
@@ -68,9 +68,9 @@ describe('AdminSidebarSectionComponent', () => {
imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()], imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()],
declarations: [AdminSidebarSectionComponent, TestComponent], declarations: [AdminSidebarSectionComponent, TestComponent],
providers: [ providers: [
{provide: 'sectionDataProvider', useValue: {model: {link: 'google.com', disabled: true}, icon: iconString}}, { provide: 'sectionDataProvider', useValue: { model: { link: 'google.com', disabled: true }, icon: iconString } },
{provide: MenuService, useValue: menuService}, { provide: MenuService, useValue: menuService },
{provide: CSSVariableService, useClass: CSSVariableServiceStub}, { provide: CSSVariableService, useClass: CSSVariableServiceStub },
], ],
}).overrideComponent(AdminSidebarSectionComponent, { }).overrideComponent(AdminSidebarSectionComponent, {
set: { set: {

View File

@@ -45,7 +45,7 @@ export class AdminWorkflowModuleModule {
static withEntryComponents() { static withEntryComponents() {
return { return {
ngModule: SharedModule, ngModule: SharedModule,
providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })),
}; };
} }
} }

View File

@@ -46,7 +46,7 @@ export class AdminModule {
static withEntryComponents() { static withEntryComponents() {
return { return {
ngModule: AdminModule, ngModule: AdminModule,
providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })),
}; };
} }
} }

View File

@@ -38,7 +38,7 @@ import {
formReducer, formReducer,
FormState, FormState,
} from './shared/form/form.reducer'; } from './shared/form/form.reducer';
import { menusReducer} from './shared/menu/menu.reducer'; import { menusReducer } from './shared/menu/menu.reducer';
import { MenusState } from './shared/menu/menus-state.model'; import { MenusState } from './shared/menu/menus-state.model';
import { import {
notificationsReducer, notificationsReducer,

View File

@@ -111,7 +111,7 @@ export class BitstreamDownloadPageComponent implements OnInit {
} else if (isAuthorized && !isLoggedIn) { } else if (isAuthorized && !isLoggedIn) {
this.hardRedirectService.redirect(bitstream._links.content.href); this.hardRedirectService.redirect(bitstream._links.content.href);
} else if (!isAuthorized && isLoggedIn) { } else if (!isAuthorized && isLoggedIn) {
this.router.navigateByUrl(getForbiddenRoute(), {skipLocationChange: true}); this.router.navigateByUrl(getForbiddenRoute(), { skipLocationChange: true });
} else if (!isAuthorized && !isLoggedIn) { } else if (!isAuthorized && !isLoggedIn) {
this.auth.setRedirectUrl(this.router.url); this.auth.setRedirectUrl(this.router.url);
this.router.navigateByUrl('login'); this.router.navigateByUrl('login');

View File

@@ -316,7 +316,7 @@ describe('EditBitstreamPageComponent', () => {
}); });
it('should call put with the correct bitstream on the PrimaryBitstreamService', () => { it('should call put with the correct bitstream on the PrimaryBitstreamService', () => {
expect(primaryBitstreamService.put).toHaveBeenCalledWith(jasmine.objectContaining({uuid: currentPrimary}), bundle); expect(primaryBitstreamService.put).toHaveBeenCalledWith(jasmine.objectContaining({ uuid: currentPrimary }), bundle);
}); });
}); });
@@ -327,7 +327,7 @@ describe('EditBitstreamPageComponent', () => {
}); });
it('should call create with the correct bitstream on the PrimaryBitstreamService', () => { it('should call create with the correct bitstream on the PrimaryBitstreamService', () => {
expect(primaryBitstreamService.create).toHaveBeenCalledWith(jasmine.objectContaining({uuid: currentPrimary}), bundle); expect(primaryBitstreamService.create).toHaveBeenCalledWith(jasmine.objectContaining({ uuid: currentPrimary }), bundle);
}); });
}); });
}); });
@@ -507,18 +507,18 @@ describe('EditBitstreamPageComponent', () => {
imports: [TranslateModule.forRoot(), RouterTestingModule], imports: [TranslateModule.forRoot(), RouterTestingModule],
declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective], declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective],
providers: [ providers: [
{provide: NotificationsService, useValue: notificationsService}, { provide: NotificationsService, useValue: notificationsService },
{provide: DynamicFormService, useValue: formService}, { provide: DynamicFormService, useValue: formService },
{ {
provide: ActivatedRoute, provide: ActivatedRoute,
useValue: { useValue: {
data: observableOf({bitstream: createSuccessfulRemoteDataObject(bitstream)}), data: observableOf({ bitstream: createSuccessfulRemoteDataObject(bitstream) }),
snapshot: {queryParams: {}}, snapshot: { queryParams: {} },
}, },
}, },
{provide: BitstreamDataService, useValue: bitstreamService}, { provide: BitstreamDataService, useValue: bitstreamService },
{provide: DSONameService, useValue: dsoNameService}, { provide: DSONameService, useValue: dsoNameService },
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService}, { provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
{ provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, { provide: PrimaryBitstreamService, useValue: primaryBitstreamService },
ChangeDetectorRef, ChangeDetectorRef,
], ],
@@ -632,17 +632,17 @@ describe('EditBitstreamPageComponent', () => {
imports: [TranslateModule.forRoot(), RouterTestingModule], imports: [TranslateModule.forRoot(), RouterTestingModule],
declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective], declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective],
providers: [ providers: [
{provide: NotificationsService, useValue: notificationsService}, { provide: NotificationsService, useValue: notificationsService },
{provide: DynamicFormService, useValue: formService}, { provide: DynamicFormService, useValue: formService },
{provide: ActivatedRoute, { provide: ActivatedRoute,
useValue: { useValue: {
data: observableOf({bitstream: createSuccessfulRemoteDataObject(bitstream)}), data: observableOf({ bitstream: createSuccessfulRemoteDataObject(bitstream) }),
snapshot: {queryParams: {}}, snapshot: { queryParams: {} },
}, },
}, },
{provide: BitstreamDataService, useValue: bitstreamService}, { provide: BitstreamDataService, useValue: bitstreamService },
{provide: DSONameService, useValue: dsoNameService}, { provide: DSONameService, useValue: dsoNameService },
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService}, { provide: BitstreamFormatDataService, useValue: bitstreamFormatService },
{ provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, { provide: PrimaryBitstreamService, useValue: primaryBitstreamService },
ChangeDetectorRef, ChangeDetectorRef,
], ],

View File

@@ -22,7 +22,7 @@ import {
hasValue, hasValue,
isUndefined, isUndefined,
} from '../shared/empty.util'; } from '../shared/empty.util';
import {Breadcrumb} from './breadcrumb/breadcrumb.model'; import { Breadcrumb } from './breadcrumb/breadcrumb.model';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root',

View File

@@ -1,4 +1,4 @@
import {Component} from '@angular/core'; import { Component } from '@angular/core';
import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { ThemedComponent } from '../../shared/theme-support/themed.component';
import { import {

View File

@@ -1,4 +1,4 @@
import {Component} from '@angular/core'; import { Component } from '@angular/core';
import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { ThemedComponent } from '../../shared/theme-support/themed.component';
import { import {

View File

@@ -1,4 +1,4 @@
import {Component} from '@angular/core'; import { Component } from '@angular/core';
import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { ThemedComponent } from '../../shared/theme-support/themed.component';
import { import {

View File

@@ -54,7 +54,7 @@ export class BrowseByModule {
static withEntryComponents() { static withEntryComponents() {
return { return {
ngModule: SharedBrowseByModule, ngModule: SharedBrowseByModule,
providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })),
}; };
} }
} }

View File

@@ -82,7 +82,7 @@ export class CollectionItemMapperComponent implements OnInit {
* A view on the tabset element * A view on the tabset element
* Used to switch tabs programmatically * Used to switch tabs programmatically
*/ */
@ViewChild('tabs', {static: false}) tabs; @ViewChild('tabs', { static: false }) tabs;
/** /**
* The collection to map items to * The collection to map items to

View File

@@ -39,7 +39,7 @@ describe('CreateCollectionPageComponent', () => {
{ provide: RouteService, useValue: { getQueryParameterValue: () => observableOf('1234') } }, { provide: RouteService, useValue: { getQueryParameterValue: () => observableOf('1234') } },
{ provide: Router, useValue: {} }, { provide: Router, useValue: {} },
{ provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: NotificationsService, useValue: new NotificationsServiceStub() },
{ provide: RequestService, useValue: {}}, { provide: RequestService, useValue: {} },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).compileComponents(); }).compileComponents();

View File

@@ -25,7 +25,7 @@ describe('CollectionCurateComponent', () => {
let dsoNameService; let dsoNameService;
const collection = Object.assign(new Collection(), { const collection = Object.assign(new Collection(), {
metadata: {'dc.title': ['Collection Name'], 'dc.identifier.uri': [ { value: '123456789/1'}]}, metadata: { 'dc.title': ['Collection Name'], 'dc.identifier.uri': [ { value: '123456789/1' }] },
}); });
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
@@ -45,8 +45,8 @@ describe('CollectionCurateComponent', () => {
imports: [TranslateModule.forRoot()], imports: [TranslateModule.forRoot()],
declarations: [CollectionCurateComponent], declarations: [CollectionCurateComponent],
providers: [ providers: [
{provide: ActivatedRoute, useValue: routeStub}, { provide: ActivatedRoute, useValue: routeStub },
{provide: DSONameService, useValue: dsoNameService}, { provide: DSONameService, useValue: dsoNameService },
], ],
schemas: [CUSTOM_ELEMENTS_SCHEMA], schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents(); }).compileComponents();

View File

@@ -80,7 +80,7 @@ describe('CollectionMetadataComponent', () => {
{ provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: createSuccessfulRemoteDataObject(collection) }) } } }, { provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: createSuccessfulRemoteDataObject(collection) }) } } },
{ provide: NotificationsService, useValue: notificationsService }, { provide: NotificationsService, useValue: notificationsService },
{ provide: RequestService, useValue: requestService }, { provide: RequestService, useValue: requestService },
{ provide: Router, useValue: routerMock}, { provide: Router, useValue: routerMock },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).compileComponents(); }).compileComponents();

View File

@@ -71,18 +71,18 @@ describe('CollectionSourceControlsComponent', () => {
], ],
oaiSource: 'oai-harvest-source', oaiSource: 'oai-harvest-source',
oaiSetId: 'oai-set-id', oaiSetId: 'oai-set-id',
_links: {self: {href: 'contentsource-selflink'}}, _links: { self: { href: 'contentsource-selflink' } },
}); });
process = Object.assign(new Process(), { process = Object.assign(new Process(), {
processId: 'process-id', processStatus: 'COMPLETED', processId: 'process-id', processStatus: 'COMPLETED',
_links: {output: {href: 'output-href'}}, _links: { output: { href: 'output-href' } },
}); });
bitstream = Object.assign(new Bitstream(), {_links: {content: {href: 'content-href'}}}); bitstream = Object.assign(new Bitstream(), { _links: { content: { href: 'content-href' } } });
collection = Object.assign(new Collection(), { collection = Object.assign(new Collection(), {
uuid: 'fake-collection-id', uuid: 'fake-collection-id',
_links: {self: {href: 'collection-selflink'}}, _links: { self: { href: 'collection-selflink' } },
}); });
notificationsService = new NotificationsServiceStub(); notificationsService = new NotificationsServiceStub();
collectionService = jasmine.createSpyObj('collectionService', { collectionService = jasmine.createSpyObj('collectionService', {
@@ -107,13 +107,13 @@ describe('CollectionSourceControlsComponent', () => {
imports: [TranslateModule.forRoot(), RouterTestingModule], imports: [TranslateModule.forRoot(), RouterTestingModule],
declarations: [CollectionSourceControlsComponent, VarDirective], declarations: [CollectionSourceControlsComponent, VarDirective],
providers: [ providers: [
{provide: ScriptDataService, useValue: scriptDataService}, { provide: ScriptDataService, useValue: scriptDataService },
{provide: ProcessDataService, useValue: processDataService}, { provide: ProcessDataService, useValue: processDataService },
{provide: RequestService, useValue: requestService}, { provide: RequestService, useValue: requestService },
{provide: NotificationsService, useValue: notificationsService}, { provide: NotificationsService, useValue: notificationsService },
{provide: CollectionDataService, useValue: collectionService}, { provide: CollectionDataService, useValue: collectionService },
{provide: HttpClient, useValue: httpClient}, { provide: HttpClient, useValue: httpClient },
{provide: BitstreamDataService, useValue: bitstreamService}, { provide: BitstreamDataService, useValue: bitstreamService },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).compileComponents(); }).compileComponents();
@@ -137,9 +137,9 @@ describe('CollectionSourceControlsComponent', () => {
scheduler.flush(); scheduler.flush();
expect(scriptDataService.invoke).toHaveBeenCalledWith('harvest', [ expect(scriptDataService.invoke).toHaveBeenCalledWith('harvest', [
{name: '-g', value: null}, { name: '-g', value: null },
{name: '-a', value: contentSource.oaiSource}, { name: '-a', value: contentSource.oaiSource },
{name: '-i', value: new ContentSourceSetSerializer().Serialize(contentSource.oaiSetId)}, { name: '-i', value: new ContentSourceSetSerializer().Serialize(contentSource.oaiSetId) },
], []); ], []);
expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false); expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false);
@@ -153,8 +153,8 @@ describe('CollectionSourceControlsComponent', () => {
scheduler.flush(); scheduler.flush();
expect(scriptDataService.invoke).toHaveBeenCalledWith('harvest', [ expect(scriptDataService.invoke).toHaveBeenCalledWith('harvest', [
{name: '-r', value: null}, { name: '-r', value: null },
{name: '-c', value: collection.uuid}, { name: '-c', value: collection.uuid },
], []); ], []);
expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false); expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false);
expect(notificationsService.success).toHaveBeenCalled(); expect(notificationsService.success).toHaveBeenCalled();
@@ -166,8 +166,8 @@ describe('CollectionSourceControlsComponent', () => {
scheduler.flush(); scheduler.flush();
expect(scriptDataService.invoke).toHaveBeenCalledWith('harvest', [ expect(scriptDataService.invoke).toHaveBeenCalledWith('harvest', [
{name: '-o', value: null}, { name: '-o', value: null },
{name: '-c', value: collection.uuid}, { name: '-c', value: collection.uuid },
], []); ], []);
expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false); expect(processDataService.findById).toHaveBeenCalledWith(process.processId, false);
expect(notificationsService.success).toHaveBeenCalled(); expect(notificationsService.success).toHaveBeenCalled();

View File

@@ -98,9 +98,9 @@ export class CollectionSourceControlsComponent implements OnDestroy {
testConfiguration(contentSource) { testConfiguration(contentSource) {
this.testConfigRunning$.next(true); this.testConfigRunning$.next(true);
this.subs.push(this.scriptDataService.invoke('harvest', [ this.subs.push(this.scriptDataService.invoke('harvest', [
{name: '-g', value: null}, { name: '-g', value: null },
{name: '-a', value: contentSource.oaiSource}, { name: '-a', value: contentSource.oaiSource },
{name: '-i', value: new ContentSourceSetSerializer().Serialize(contentSource.oaiSetId)}, { name: '-i', value: new ContentSourceSetSerializer().Serialize(contentSource.oaiSetId) },
], []).pipe( ], []).pipe(
getFirstCompletedRemoteData(), getFirstCompletedRemoteData(),
tap((rd) => { tap((rd) => {
@@ -131,7 +131,7 @@ export class CollectionSourceControlsComponent implements OnDestroy {
} }
if (process.processStatus.toString() === ProcessStatus[ProcessStatus.COMPLETED].toString()) { if (process.processStatus.toString() === ProcessStatus[ProcessStatus.COMPLETED].toString()) {
this.bitstreamService.findByHref(process._links.output.href).pipe(getFirstSucceededRemoteDataPayload()).subscribe((bitstream) => { this.bitstreamService.findByHref(process._links.output.href).pipe(getFirstSucceededRemoteDataPayload()).subscribe((bitstream) => {
this.httpClient.get(bitstream._links.content.href, {responseType: 'text'}).subscribe((data: any) => { this.httpClient.get(bitstream._links.content.href, { responseType: 'text' }).subscribe((data: any) => {
const output = data.replaceAll(new RegExp('.*\\@(.*)', 'g'), '$1') const output = data.replaceAll(new RegExp('.*\\@(.*)', 'g'), '$1')
.replaceAll('The script has started', '') .replaceAll('The script has started', '')
.replaceAll('The script has completed', ''); .replaceAll('The script has completed', '');
@@ -150,8 +150,8 @@ export class CollectionSourceControlsComponent implements OnDestroy {
importNow() { importNow() {
this.importRunning$.next(true); this.importRunning$.next(true);
this.subs.push(this.scriptDataService.invoke('harvest', [ this.subs.push(this.scriptDataService.invoke('harvest', [
{name: '-r', value: null}, { name: '-r', value: null },
{name: '-c', value: this.collection.uuid}, { name: '-c', value: this.collection.uuid },
], []) ], [])
.pipe( .pipe(
getFirstCompletedRemoteData(), getFirstCompletedRemoteData(),
@@ -197,8 +197,8 @@ export class CollectionSourceControlsComponent implements OnDestroy {
resetAndReimport() { resetAndReimport() {
this.reImportRunning$.next(true); this.reImportRunning$.next(true);
this.subs.push(this.scriptDataService.invoke('harvest', [ this.subs.push(this.scriptDataService.invoke('harvest', [
{name: '-o', value: null}, { name: '-o', value: null },
{name: '-c', value: this.collection.uuid}, { name: '-c', value: this.collection.uuid },
], []) ], [])
.pipe( .pipe(
getFirstCompletedRemoteData(), getFirstCompletedRemoteData(),

View File

@@ -11,7 +11,7 @@ import { finalize } from 'rxjs/operators';
import { FindListOptions } from '../core/data/find-list-options.model'; import { FindListOptions } from '../core/data/find-list-options.model';
import { hasValue } from '../shared/empty.util'; import { hasValue } from '../shared/empty.util';
import { CommunityListService} from './community-list-service'; import { CommunityListService } from './community-list-service';
import { FlatNode } from './flat-node.model'; import { FlatNode } from './flat-node.model';
/** /**

View File

@@ -14,7 +14,7 @@ import {
import { FindListOptions } from '../../core/data/find-list-options.model'; import { FindListOptions } from '../../core/data/find-list-options.model';
import { isEmpty } from '../../shared/empty.util'; import { isEmpty } from '../../shared/empty.util';
import { CommunityListDatasource } from '../community-list-datasource'; import { CommunityListDatasource } from '../community-list-datasource';
import { CommunityListService} from '../community-list-service'; import { CommunityListService } from '../community-list-service';
import { FlatNode } from '../flat-node.model'; import { FlatNode } from '../flat-node.model';
/** /**

View File

@@ -24,7 +24,7 @@ import { MetadataService } from '../core/metadata/metadata.service';
import { redirectOn4xx } from '../core/shared/authorized.operators'; import { redirectOn4xx } from '../core/shared/authorized.operators';
import { Bitstream } from '../core/shared/bitstream.model'; import { Bitstream } from '../core/shared/bitstream.model';
import { Community } from '../core/shared/community.model'; import { Community } from '../core/shared/community.model';
import { getAllSucceededRemoteDataPayload} from '../core/shared/operators'; import { getAllSucceededRemoteDataPayload } from '../core/shared/operators';
import { fadeInOut } from '../shared/animations/fade'; import { fadeInOut } from '../shared/animations/fade';
import { hasValue } from '../shared/empty.util'; import { hasValue } from '../shared/empty.util';
import { getCommunityPageRoute } from './community-page-routing-paths'; import { getCommunityPageRoute } from './community-page-routing-paths';

View File

@@ -31,7 +31,7 @@ describe('DeleteCommunityPageComponent', () => {
{ provide: CommunityDataService, useValue: {} }, { provide: CommunityDataService, useValue: {} },
{ provide: ActivatedRoute, useValue: { data: observableOf({ dso: { payload: {} } }) } }, { provide: ActivatedRoute, useValue: { data: observableOf({ dso: { payload: {} } }) } },
{ provide: NotificationsService, useValue: {} }, { provide: NotificationsService, useValue: {} },
{ provide: RequestService, useValue: {}}, { provide: RequestService, useValue: {} },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).compileComponents(); }).compileComponents();

View File

@@ -25,7 +25,7 @@ describe('CommunityCurateComponent', () => {
let dsoNameService; let dsoNameService;
const community = Object.assign(new Community(), { const community = Object.assign(new Community(), {
metadata: {'dc.title': ['Community Name'], 'dc.identifier.uri': [ { value: '123456789/1'}]}, metadata: { 'dc.title': ['Community Name'], 'dc.identifier.uri': [ { value: '123456789/1' }] },
}); });
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
@@ -45,8 +45,8 @@ describe('CommunityCurateComponent', () => {
imports: [TranslateModule.forRoot()], imports: [TranslateModule.forRoot()],
declarations: [CommunityCurateComponent], declarations: [CommunityCurateComponent],
providers: [ providers: [
{provide: ActivatedRoute, useValue: routeStub}, { provide: ActivatedRoute, useValue: routeStub },
{provide: DSONameService, useValue: dsoNameService}, { provide: DSONameService, useValue: dsoNameService },
], ],
schemas: [CUSTOM_ELEMENTS_SCHEMA], schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents(); }).compileComponents();

View File

@@ -92,7 +92,7 @@ export class CommunityPageSubCollectionListComponent implements OnInit, OnDestro
return this.cds.findByParent(this.community.id, { return this.cds.findByParent(this.community.id, {
currentPage: currentPagination.currentPage, currentPage: currentPagination.currentPage,
elementsPerPage: currentPagination.pageSize, elementsPerPage: currentPagination.pageSize,
sort: {field: currentSort.field, direction: currentSort.direction}, sort: { field: currentSort.field, direction: currentSort.direction },
}); });
}), }),
).subscribe((results) => { ).subscribe((results) => {

View File

@@ -468,7 +468,7 @@ export class AuthService {
// Set the cookie expire date // Set the cookie expire date
const expires = new Date(expireDate); const expires = new Date(expireDate);
const options: CookieAttributes = {expires: expires}; const options: CookieAttributes = { expires: expires };
// Save cookie with the token // Save cookie with the token
return this.storage.set(TOKENITEM, token, options); return this.storage.set(TOKENITEM, token, options);
@@ -560,7 +560,7 @@ export class AuthService {
// Set the cookie expire date // Set the cookie expire date
const expires = new Date(expireDate); const expires = new Date(expireDate);
const options: CookieAttributes = {expires: expires}; const options: CookieAttributes = { expires: expires };
this.storage.set(REDIRECT_COOKIE, url, options); this.storage.set(REDIRECT_COOKIE, url, options);
this.store.dispatch(new SetRedirectUrlAction(isNotUndefined(url) ? url : '')); this.store.dispatch(new SetRedirectUrlAction(isNotUndefined(url) ? url : ''));
} }

View File

@@ -21,7 +21,7 @@ import { first } from 'rxjs/operators';
import { TestScheduler } from 'rxjs/testing'; import { TestScheduler } from 'rxjs/testing';
import { storeModuleConfig } from '../../app.reducer'; import { storeModuleConfig } from '../../app.reducer';
import { coreReducers} from '../core.reducers'; import { coreReducers } from '../core.reducers';
import { CoreState } from '../core-state.model'; import { CoreState } from '../core-state.model';
import { RestRequestMethod } from '../data/rest-request-method'; import { RestRequestMethod } from '../data/rest-request-method';
import { RemoveFromIndexBySubstringAction } from '../index/index.actions'; import { RemoveFromIndexBySubstringAction } from '../index/index.actions';

View File

@@ -3,7 +3,7 @@ import { CacheableObject } from '../cache/cacheable-object.model';
import { ObjectCacheService } from '../cache/object-cache.service'; import { ObjectCacheService } from '../cache/object-cache.service';
import { DSpaceObject } from '../shared/dspace-object.model'; import { DSpaceObject } from '../shared/dspace-object.model';
import { BaseResponseParsingService } from './base-response-parsing.service'; import { BaseResponseParsingService } from './base-response-parsing.service';
import { GetRequest} from './request.models'; import { GetRequest } from './request.models';
import { RestRequest } from './rest-request.model'; import { RestRequest } from './rest-request.model';
class TestService extends BaseResponseParsingService { class TestService extends BaseResponseParsingService {

View File

@@ -3,7 +3,7 @@ import {
RouterStateSnapshot, RouterStateSnapshot,
} from '@angular/router'; } from '@angular/router';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { map} from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { FeatureID } from '../feature-id'; import { FeatureID } from '../feature-id';
import { SomeFeatureAuthorizationGuard } from './some-feature-authorization.guard'; import { SomeFeatureAuthorizationGuard } from './some-feature-authorization.guard';

View File

@@ -18,14 +18,14 @@ import { RemoteDataBuildService } from '../cache/builders/remote-data-build.serv
import { ObjectCacheService } from '../cache/object-cache.service'; import { ObjectCacheService } from '../cache/object-cache.service';
import { CoreState } from '../core-state.model'; import { CoreState } from '../core-state.model';
import { HttpOptions } from '../dspace-rest/dspace-rest.service'; import { HttpOptions } from '../dspace-rest/dspace-rest.service';
import {ConfigurationProperty} from '../shared/configuration-property.model'; import { ConfigurationProperty } from '../shared/configuration-property.model';
import { HALEndpointService } from '../shared/hal-endpoint.service'; import { HALEndpointService } from '../shared/hal-endpoint.service';
import { Item } from '../shared/item.model'; import { Item } from '../shared/item.model';
import { getFirstCompletedRemoteData } from '../shared/operators'; import { getFirstCompletedRemoteData } from '../shared/operators';
import { sendRequest } from '../shared/request.operators'; import { sendRequest } from '../shared/request.operators';
import { BaseDataService } from './base/base-data.service'; import { BaseDataService } from './base/base-data.service';
import { dataService } from './base/data-service.decorator'; import { dataService } from './base/data-service.decorator';
import {ConfigurationDataService} from './configuration-data.service'; import { ConfigurationDataService } from './configuration-data.service';
import { DefaultChangeAnalyzer } from './default-change-analyzer.service'; import { DefaultChangeAnalyzer } from './default-change-analyzer.service';
import { RemoteData } from './remote-data'; import { RemoteData } from './remote-data';
import { PostRequest } from './request.models'; import { PostRequest } from './request.models';

View File

@@ -114,7 +114,7 @@ export class SelectVirtualMetadataAction implements Action {
uuid: string, uuid: string,
select: boolean, select: boolean,
) { ) {
this.payload = { url, source, uuid, select: select}; this.payload = { url, source, uuid, select: select };
} }
} }

View File

@@ -181,7 +181,7 @@ function addFieldUpdate(state: any, action: AddFieldUpdateAction) {
const url: string = action.payload.url; const url: string = action.payload.url;
const field: Identifiable = action.payload.field; const field: Identifiable = action.payload.field;
const changeType: FieldChangeType = action.payload.changeType; const changeType: FieldChangeType = action.payload.changeType;
const pageState: ObjectUpdatesEntry = state[url] || {fieldUpdates: {}}; const pageState: ObjectUpdatesEntry = state[url] || { fieldUpdates: {} };
let states = pageState.fieldStates; let states = pageState.fieldStates;
if (changeType === FieldChangeType.ADD) { if (changeType === FieldChangeType.ADD) {
@@ -234,7 +234,7 @@ function selectVirtualMetadata(state: any, action: SelectVirtualMetadataAction)
const newPageState = Object.assign( const newPageState = Object.assign(
{}, {},
pageState, pageState,
{virtualMetadataSources: virtualMetadataSources}, { virtualMetadataSources: virtualMetadataSources },
); );
return Object.assign( return Object.assign(

View File

@@ -61,7 +61,7 @@ describe('PrimaryBitstreamService', () => {
rdbService = getMockRemoteDataBuildService(); rdbService = getMockRemoteDataBuildService();
notificationService = new NotificationsServiceStub() as any; notificationService = new NotificationsServiceStub() as any;
bundleDataService = jasmine.createSpyObj('bundleDataService', {'findByHref': createSuccessfulRemoteDataObject$(bundle)}); bundleDataService = jasmine.createSpyObj('bundleDataService', { 'findByHref': createSuccessfulRemoteDataObject$(bundle) });
service = new PrimaryBitstreamService(requestService, rdbService, objectCache, halService, notificationService, bundleDataService); service = new PrimaryBitstreamService(requestService, rdbService, objectCache, halService, notificationService, bundleDataService);
}); });

View File

@@ -11,7 +11,7 @@ import {
ResetResponseTimestampsAction, ResetResponseTimestampsAction,
} from './request.actions'; } from './request.actions';
import { GetRequest } from './request.models'; import { GetRequest } from './request.models';
import { requestReducer} from './request.reducer'; import { requestReducer } from './request.reducer';
import { RequestEntryState } from './request-entry-state.model'; import { RequestEntryState } from './request-entry-state.model';
import { RequestState } from './request-state.model'; import { RequestState } from './request-state.model';

View File

@@ -28,7 +28,7 @@ import {
getMockUUIDService, getMockUUIDService,
} from '../../shared/mocks/uuid.service.mock'; } from '../../shared/mocks/uuid.service.mock';
import { ObjectCacheService } from '../cache/object-cache.service'; import { ObjectCacheService } from '../cache/object-cache.service';
import { coreReducers} from '../core.reducers'; import { coreReducers } from '../core.reducers';
import { CoreState } from '../core-state.model'; import { CoreState } from '../core-state.model';
import { UUIDService } from '../shared/uuid.service'; import { UUIDService } from '../shared/uuid.service';
import { import {

View File

@@ -40,7 +40,7 @@ import {
RequestExecuteAction, RequestExecuteAction,
RequestStaleAction, RequestStaleAction,
} from './request.actions'; } from './request.actions';
import { GetRequest} from './request.models'; import { GetRequest } from './request.models';
import { RequestEntry } from './request-entry.model'; import { RequestEntry } from './request-entry.model';
import { import {
isLoading, isLoading,

View File

@@ -131,7 +131,7 @@ export class VersionHistoryDataService extends IdentifiableDataService<VersionHi
pageSize: 1, pageSize: 1,
}); });
const latestVersionSearch = new PaginatedSearchOptions({pagination: latestVersionOptions}); const latestVersionSearch = new PaginatedSearchOptions({ pagination: latestVersionOptions });
return this.getVersions(versionHistory.id, latestVersionSearch, false, true, followLink('item')).pipe( return this.getVersions(versionHistory.id, latestVersionSearch, false, true, followLink('item')).pipe(
getAllSucceededRemoteData(), getAllSucceededRemoteData(),

View File

@@ -55,7 +55,7 @@ export class DspaceRestService {
get(absoluteURL: string): Observable<RawRestResponse> { get(absoluteURL: string): Observable<RawRestResponse> {
const requestOptions = { const requestOptions = {
observe: 'response' as any, observe: 'response' as any,
headers: new HttpHeaders({'Content-Type': DEFAULT_CONTENT_TYPE}), headers: new HttpHeaders({ 'Content-Type': DEFAULT_CONTENT_TYPE }),
}; };
return this.http.get(absoluteURL, requestOptions).pipe( return this.http.get(absoluteURL, requestOptions).pipe(
map((res: HttpResponse<any>) => ({ map((res: HttpResponse<any>) => ({

View File

@@ -11,7 +11,7 @@ import {
import { REQUEST } from '@nguniversal/express-engine/tokens'; import { REQUEST } from '@nguniversal/express-engine/tokens';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@Injectable({providedIn: 'root'}) @Injectable({ providedIn: 'root' })
/** /**
* Http Interceptor intercepting Http Requests, adding the client's IP to their X-Forwarded-For header * Http Interceptor intercepting Http Requests, adding the client's IP to their X-Forwarded-For header
*/ */

View File

@@ -143,7 +143,7 @@ export class GoogleRecaptchaService {
*/ */
public getRecaptchaToken(action) { public getRecaptchaToken(action) {
return this.captchaKey().pipe( return this.captchaKey().pipe(
switchMap((key) => grecaptcha.execute(key, {action: action})), switchMap((key) => grecaptcha.execute(key, { action: action })),
); );
} }

View File

@@ -39,15 +39,15 @@ describe(`index selectors`, () => {
const source = 'https://rest.api/core/communities/search/top?page=0&size=50&sort=dc.title,ASC&embed.size=subcommunities=5&embed=subcommunities'; const source = 'https://rest.api/core/communities/search/top?page=0&size=50&sort=dc.title,ASC&embed.size=subcommunities=5&embed=subcommunities';
const result = getEmbedSizeParams(source); const result = getEmbedSizeParams(source);
expect(result).toHaveSize(1); expect(result).toHaveSize(1);
expect(result[0]).toEqual({name: 'subcommunities', size: 5}); expect(result[0]).toEqual({ name: 'subcommunities', size: 5 });
}); });
it(`url with multiple embed size param => should return list with {name, size}`, () => { it(`url with multiple embed size param => should return list with {name, size}`, () => {
const source = 'https://rest.api/core/communities/search/top?page=0&size=50&sort=dc.title,ASC&embed.size=subcommunities=5&embed=subcommunities&embed.size=collections=1&embed=collections'; const source = 'https://rest.api/core/communities/search/top?page=0&size=50&sort=dc.title,ASC&embed.size=subcommunities=5&embed=subcommunities&embed.size=collections=1&embed=collections';
const result = getEmbedSizeParams(source); const result = getEmbedSizeParams(source);
expect(result).toHaveSize(2); expect(result).toHaveSize(2);
expect(result[0]).toEqual({name: 'subcommunities', size: 5}); expect(result[0]).toEqual({ name: 'subcommunities', size: 5 });
expect(result[1]).toEqual({name: 'collections', size: 1}); expect(result[1]).toEqual({ name: 'collections', size: 1 });
}); });
it(`url without params => should return empty list`, () => { it(`url without params => should return empty list`, () => {

View File

@@ -52,6 +52,6 @@ export class JsonPatchOperationPathCombiner extends URLCombiner {
path += '/' + fragment; path += '/' + fragment;
} }
return {rootElement: this._rootElement, subRootElement: this._subRootElement, path: path}; return { rootElement: this._rootElement, subRootElement: this._subRootElement, path: path };
} }
} }

View File

@@ -26,7 +26,7 @@ describe('LogInterceptor', () => {
let httpMock: HttpTestingController; let httpMock: HttpTestingController;
let cookieService: CookieService; let cookieService: CookieService;
let correlationIdService: CorrelationIdService; let correlationIdService: CorrelationIdService;
const router = Object.assign(new RouterStub(),{url : '/statistics'}); const router = Object.assign(new RouterStub(),{ url : '/statistics' });
// Mock payload/statuses are dummy content as we are not testing the results // Mock payload/statuses are dummy content as we are not testing the results
// of any below requests. We are only testing for X-XSRF-TOKEN header. // of any below requests. We are only testing for X-XSRF-TOKEN header.

View File

@@ -68,7 +68,7 @@ describe('MetadataService', () => {
let appConfig: AppConfig; let appConfig: AppConfig;
const initialState = { 'core': { metaTag: { tagsInUse: ['title', 'description'] }}}; const initialState = { 'core': { metaTag: { tagsInUse: ['title', 'description'] } } };
beforeEach(() => { beforeEach(() => {
@@ -514,8 +514,8 @@ describe('MetadataService', () => {
totalElements: bitstreams.length, // announce multiple elements/pages totalElements: bitstreams.length, // announce multiple elements/pages
}, },
_links: index < bitstreams.length - 1 _links: index < bitstreams.length - 1
? { next: { href: 'not empty' }} // fake link to the next bitstream page ? { next: { href: 'not empty' } } // fake link to the next bitstream page
: { next: { href: undefined }}, // last page has no link : { next: { href: undefined } }, // last page has no link
})); }));
}; };
}); });

View File

@@ -97,13 +97,13 @@ describe('PaginationService', () => {
spyOn(service, 'updateRoute'); spyOn(service, 'updateRoute');
service.resetPage('test'); service.resetPage('test');
expect(service.updateRoute).toHaveBeenCalledWith('test', {page: 1}); expect(service.updateRoute).toHaveBeenCalledWith('test', { page: 1 });
}); });
}); });
describe('updateRoute', () => { describe('updateRoute', () => {
it('should update the route with the provided page params', () => { it('should update the route with the provided page params', () => {
service.updateRoute('test', {page: 2, pageSize: 5, sortField: 'title', sortDirection: SortDirection.DESC}); service.updateRoute('test', { page: 2, pageSize: 5, sortField: 'title', sortDirection: SortDirection.DESC });
const navigateParams = {}; const navigateParams = {};
navigateParams[`test.page`] = `2`; navigateParams[`test.page`] = `2`;
@@ -111,10 +111,10 @@ describe('PaginationService', () => {
navigateParams[`test.sf`] = `title`; navigateParams[`test.sf`] = `title`;
navigateParams[`test.sd`] = `DESC`; navigateParams[`test.sd`] = `DESC`;
expect(router.navigate).toHaveBeenCalledWith([], {queryParams: navigateParams, queryParamsHandling: 'merge'}); expect(router.navigate).toHaveBeenCalledWith([], { queryParams: navigateParams, queryParamsHandling: 'merge' });
}); });
it('should update the route with the provided page params while keeping the existing non provided ones', () => { it('should update the route with the provided page params while keeping the existing non provided ones', () => {
service.updateRoute('test', {page: 2}); service.updateRoute('test', { page: 2 });
const navigateParams = {}; const navigateParams = {};
navigateParams[`test.page`] = `2`; navigateParams[`test.page`] = `2`;
@@ -122,10 +122,10 @@ describe('PaginationService', () => {
navigateParams[`test.sf`] = `score`; navigateParams[`test.sf`] = `score`;
navigateParams[`test.sd`] = `ASC`; navigateParams[`test.sd`] = `ASC`;
expect(router.navigate).toHaveBeenCalledWith([], {queryParams: navigateParams, queryParamsHandling: 'merge'}); expect(router.navigate).toHaveBeenCalledWith([], { queryParams: navigateParams, queryParamsHandling: 'merge' });
}); });
it('should pass on navigationExtras to router.navigate', () => { it('should pass on navigationExtras to router.navigate', () => {
service.updateRoute('test', {page: 2}, undefined, undefined, { queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); service.updateRoute('test', { page: 2 }, undefined, undefined, { queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true });
const navigateParams = {}; const navigateParams = {};
navigateParams[`test.page`] = `2`; navigateParams[`test.page`] = `2`;
@@ -133,12 +133,12 @@ describe('PaginationService', () => {
navigateParams[`test.sf`] = `score`; navigateParams[`test.sf`] = `score`;
navigateParams[`test.sd`] = `ASC`; navigateParams[`test.sd`] = `ASC`;
expect(router.navigate).toHaveBeenCalledWith([], {queryParams: navigateParams, queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); expect(router.navigate).toHaveBeenCalledWith([], { queryParams: navigateParams, queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true });
}); });
}); });
describe('updateRouteWithUrl', () => { describe('updateRouteWithUrl', () => {
it('should update the route with the provided page params and url', () => { it('should update the route with the provided page params and url', () => {
service.updateRouteWithUrl('test', ['someUrl'], {page: 2, pageSize: 5, sortField: 'title', sortDirection: SortDirection.DESC}); service.updateRouteWithUrl('test', ['someUrl'], { page: 2, pageSize: 5, sortField: 'title', sortDirection: SortDirection.DESC });
const navigateParams = {}; const navigateParams = {};
navigateParams[`test.page`] = `2`; navigateParams[`test.page`] = `2`;
@@ -146,10 +146,10 @@ describe('PaginationService', () => {
navigateParams[`test.sf`] = `title`; navigateParams[`test.sf`] = `title`;
navigateParams[`test.sd`] = `DESC`; navigateParams[`test.sd`] = `DESC`;
expect(router.navigate).toHaveBeenCalledWith(['someUrl'], {queryParams: navigateParams, queryParamsHandling: 'merge'}); expect(router.navigate).toHaveBeenCalledWith(['someUrl'], { queryParams: navigateParams, queryParamsHandling: 'merge' });
}); });
it('should update the route with the provided page params and url while keeping the existing non provided ones', () => { it('should update the route with the provided page params and url while keeping the existing non provided ones', () => {
service.updateRouteWithUrl('test',['someUrl'], {page: 2}); service.updateRouteWithUrl('test',['someUrl'], { page: 2 });
const navigateParams = {}; const navigateParams = {};
navigateParams[`test.page`] = `2`; navigateParams[`test.page`] = `2`;
@@ -157,10 +157,10 @@ describe('PaginationService', () => {
navigateParams[`test.sf`] = `score`; navigateParams[`test.sf`] = `score`;
navigateParams[`test.sd`] = `ASC`; navigateParams[`test.sd`] = `ASC`;
expect(router.navigate).toHaveBeenCalledWith(['someUrl'], {queryParams: navigateParams, queryParamsHandling: 'merge'}); expect(router.navigate).toHaveBeenCalledWith(['someUrl'], { queryParams: navigateParams, queryParamsHandling: 'merge' });
}); });
it('should pass on navigationExtras to router.navigate', () => { it('should pass on navigationExtras to router.navigate', () => {
service.updateRouteWithUrl('test',['someUrl'], {page: 2}, undefined, undefined, { queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); service.updateRouteWithUrl('test',['someUrl'], { page: 2 }, undefined, undefined, { queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true });
const navigateParams = {}; const navigateParams = {};
navigateParams[`test.page`] = `2`; navigateParams[`test.page`] = `2`;
@@ -168,7 +168,7 @@ describe('PaginationService', () => {
navigateParams[`test.sf`] = `score`; navigateParams[`test.sf`] = `score`;
navigateParams[`test.sd`] = `ASC`; navigateParams[`test.sd`] = `ASC`;
expect(router.navigate).toHaveBeenCalledWith(['someUrl'], {queryParams: navigateParams, queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true }); expect(router.navigate).toHaveBeenCalledWith(['someUrl'], { queryParams: navigateParams, queryParamsHandling: 'preserve', replaceUrl: true, preserveFragment: true });
}); });
}); });
describe('clearPagination', () => { describe('clearPagination', () => {
@@ -190,7 +190,7 @@ describe('PaginationService', () => {
service.updateRoute('another-id', {}); service.updateRoute('another-id', {});
expect(router.navigate).toHaveBeenCalledWith([], {queryParams: Object.assign({}, resetParams, navigateParams), queryParamsHandling: 'merge'}); expect(router.navigate).toHaveBeenCalledWith([], { queryParams: Object.assign({}, resetParams, navigateParams), queryParamsHandling: 'merge' });
}); });
}); });
describe('getPageParam', () => { describe('getPageParam', () => {

View File

@@ -126,7 +126,7 @@ export class PaginationService {
* @param paginationId - The pagination id for which to reset the page * @param paginationId - The pagination id for which to reset the page
*/ */
resetPage(paginationId: string) { resetPage(paginationId: string) {
this.updateRoute(paginationId, {page: 1}); this.updateRoute(paginationId, { page: 1 });
} }

View File

@@ -15,7 +15,7 @@ export function locationProvider(): Location {
/** /**
* Service for performing hard redirects within the browser app module * Service for performing hard redirects within the browser app module
*/ */
@Injectable({providedIn: 'root'}) @Injectable({ providedIn: 'root' })
export class BrowserHardRedirectService extends HardRedirectService { export class BrowserHardRedirectService extends HardRedirectService {
constructor( constructor(

View File

@@ -32,7 +32,7 @@ export class RouteEffects {
.pipe( .pipe(
ofType(RouteActionTypes.RESET), ofType(RouteActionTypes.RESET),
tap(() => this.service.setCurrentRouteInfo()), tap(() => this.service.setCurrentRouteInfo()),
), {dispatch: false }); ), { dispatch: false });
constructor(private actions$: Actions, private service: RouteService) { constructor(private actions$: Actions, private service: RouteService) {
} }

View File

@@ -7,7 +7,7 @@ describe(`ServerReferrerService`, () => {
describe(`getReferrer`, () => { describe(`getReferrer`, () => {
describe(`when the referer header is set`, () => { describe(`when the referer header is set`, () => {
beforeEach(() => { beforeEach(() => {
service = new ServerReferrerService({ headers: { referer: referrer }}); service = new ServerReferrerService({ headers: { referer: referrer } });
}); });
it(`should return the referer header`, (done: DoneFn) => { it(`should return the referer header`, (done: DoneFn) => {
@@ -20,7 +20,7 @@ describe(`ServerReferrerService`, () => {
describe(`when the referer header is not set`, () => { describe(`when the referer header is not set`, () => {
beforeEach(() => { beforeEach(() => {
service = new ServerReferrerService({ headers: {}}); service = new ServerReferrerService({ headers: {} });
}); });
it(`should return an empty string`, (done: DoneFn) => { it(`should return an empty string`, (done: DoneFn) => {

View File

@@ -13,8 +13,8 @@ import { RemoteData } from '../data/remote-data';
import { BITSTREAM } from './bitstream.resource-type'; import { BITSTREAM } from './bitstream.resource-type';
import { BitstreamFormat } from './bitstream-format.model'; import { BitstreamFormat } from './bitstream-format.model';
import { BITSTREAM_FORMAT } from './bitstream-format.resource-type'; import { BITSTREAM_FORMAT } from './bitstream-format.resource-type';
import {Bundle} from './bundle.model'; import { Bundle } from './bundle.model';
import {BUNDLE} from './bundle.resource-type'; import { BUNDLE } from './bundle.resource-type';
import { ChildHALResource } from './child-hal-resource.model'; import { ChildHALResource } from './child-hal-resource.model';
import { DSpaceObject } from './dspace-object.model'; import { DSpaceObject } from './dspace-object.model';
import { HALLink } from './hal-link.model'; import { HALLink } from './hal-link.model';

View File

@@ -11,7 +11,7 @@ import {
} from '../cache/builders/build-decorators'; } from '../cache/builders/build-decorators';
import { PaginatedList } from '../data/paginated-list.model'; import { PaginatedList } from '../data/paginated-list.model';
import { RemoteData } from '../data/remote-data'; import { RemoteData } from '../data/remote-data';
import {excludeFromEquals} from '../utilities/equals.decorators'; import { excludeFromEquals } from '../utilities/equals.decorators';
import { Bitstream } from './bitstream.model'; import { Bitstream } from './bitstream.model';
import { BITSTREAM } from './bitstream.resource-type'; import { BITSTREAM } from './bitstream.resource-type';
import { ChildHALResource } from './child-hal-resource.model'; import { ChildHALResource } from './child-hal-resource.model';

View File

@@ -20,7 +20,7 @@ import { URLCombiner } from '../url-combiner/url-combiner';
/** /**
* Provides utility methods to save files on the client-side. * Provides utility methods to save files on the client-side.
*/ */
@Injectable({providedIn: 'root'}) @Injectable({ providedIn: 'root' })
export class FileService { export class FileService {
constructor( constructor(
@Inject(NativeWindowService) protected _window: NativeWindowRef, @Inject(NativeWindowService) protected _window: NativeWindowRef,

View File

@@ -1,4 +1,4 @@
import {ResourceType} from '../../resource-type'; import { ResourceType } from '../../resource-type';
/** /**
* The resource type for SearchConfig * The resource type for SearchConfig

View File

@@ -1,7 +1,7 @@
import { WorkspaceitemSectionAccessesObject } from './workspaceitem-section-accesses.model'; import { WorkspaceitemSectionAccessesObject } from './workspaceitem-section-accesses.model';
import { WorkspaceitemSectionCcLicenseObject } from './workspaceitem-section-cc-license.model'; import { WorkspaceitemSectionCcLicenseObject } from './workspaceitem-section-cc-license.model';
import { WorkspaceitemSectionFormObject } from './workspaceitem-section-form.model'; import { WorkspaceitemSectionFormObject } from './workspaceitem-section-form.model';
import {WorkspaceitemSectionIdentifiersObject} from './workspaceitem-section-identifiers.model'; import { WorkspaceitemSectionIdentifiersObject } from './workspaceitem-section-identifiers.model';
import { WorkspaceitemSectionLicenseObject } from './workspaceitem-section-license.model'; import { WorkspaceitemSectionLicenseObject } from './workspaceitem-section-license.model';
import { WorkspaceitemSectionSherpaPoliciesObject } from './workspaceitem-section-sherpa-policies.model'; import { WorkspaceitemSectionSherpaPoliciesObject } from './workspaceitem-section-sherpa-policies.model';
import { WorkspaceitemSectionUploadObject } from './workspaceitem-section-upload.model'; import { WorkspaceitemSectionUploadObject } from './workspaceitem-section-upload.model';

View File

@@ -39,7 +39,7 @@ describe('CurationFormComponent', () => {
let notificationsService; let notificationsService;
let router; let router;
const process = Object.assign(new Process(), {processId: 'process-id'}); const process = Object.assign(new Process(), { processId: 'process-id' });
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
@@ -79,7 +79,7 @@ describe('CurationFormComponent', () => {
{ provide: ProcessDataService, useValue: processDataService }, { provide: ProcessDataService, useValue: processDataService },
{ provide: NotificationsService, useValue: notificationsService }, { provide: NotificationsService, useValue: notificationsService },
{ provide: HandleService, useValue: handleService }, { provide: HandleService, useValue: handleService },
{ provide: Router, useValue: router}, { provide: Router, useValue: router },
{ provide: ConfigurationDataService, useValue: configurationDataService }, { provide: ConfigurationDataService, useValue: configurationDataService },
], ],
schemas: [CUSTOM_ELEMENTS_SCHEMA], schemas: [CUSTOM_ELEMENTS_SCHEMA],
@@ -121,8 +121,8 @@ describe('CurationFormComponent', () => {
comp.submit(); comp.submit();
expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [ expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [
{name: '-t', value: 'profileformats'}, { name: '-t', value: 'profileformats' },
{name: '-i', value: 'test-handle'}, { name: '-i', value: 'test-handle' },
], []); ], []);
expect(notificationsService.success).toHaveBeenCalled(); expect(notificationsService.success).toHaveBeenCalled();
expect(router.navigateByUrl).toHaveBeenCalledWith(getProcessDetailRoute('process-id')); expect(router.navigateByUrl).toHaveBeenCalledWith(getProcessDetailRoute('process-id'));
@@ -134,8 +134,8 @@ describe('CurationFormComponent', () => {
comp.submit(); comp.submit();
expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [ expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [
{name: '-t', value: 'profileformats'}, { name: '-t', value: 'profileformats' },
{name: '-i', value: 'test-handle'}, { name: '-i', value: 'test-handle' },
], []); ], []);
expect(notificationsService.error).toHaveBeenCalled(); expect(notificationsService.error).toHaveBeenCalled();
expect(processDataService.findByHref).not.toHaveBeenCalled(); expect(processDataService.findByHref).not.toHaveBeenCalled();
@@ -148,8 +148,8 @@ describe('CurationFormComponent', () => {
comp.submit(); comp.submit();
expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [ expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [
{name: '-t', value: 'profileformats'}, { name: '-t', value: 'profileformats' },
{name: '-i', value: 'form-handle'}, { name: '-i', value: 'form-handle' },
], []); ], []);
}); });
it('should use "all" when the handle provided by the form is empty and when no dsoHandle is provided', () => { it('should use "all" when the handle provided by the form is empty and when no dsoHandle is provided', () => {
@@ -157,8 +157,8 @@ describe('CurationFormComponent', () => {
comp.submit(); comp.submit();
expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [ expect(scriptDataService.invoke).toHaveBeenCalledWith('curate', [
{name: '-t', value: 'profileformats'}, { name: '-t', value: 'profileformats' },
{name: '-i', value: 'all'}, { name: '-i', value: 'all' },
], []); ], []);
}); });

View File

@@ -171,14 +171,14 @@ describe('JournalIssueSearchResultListElementComponent', () => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [JournalIssueSearchResultListElementComponent, TruncatePipe], declarations: [JournalIssueSearchResultListElementComponent, TruncatePipe],
providers: [ providers: [
{provide: TruncatableService, useValue: {}}, { provide: TruncatableService, useValue: {} },
{provide: DSONameService, useClass: DSONameServiceMock}, { provide: DSONameService, useClass: DSONameServiceMock },
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }, { provide: APP_CONFIG, useValue: enviromentNoThumbs },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(JournalIssueSearchResultListElementComponent, { }).overrideComponent(JournalIssueSearchResultListElementComponent, {
set: {changeDetection: ChangeDetectionStrategy.Default}, set: { changeDetection: ChangeDetectionStrategy.Default },
}).compileComponents(); }).compileComponents();
})); }));

View File

@@ -169,14 +169,14 @@ describe('JournalVolumeSearchResultListElementComponent', () => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [JournalVolumeSearchResultListElementComponent, TruncatePipe], declarations: [JournalVolumeSearchResultListElementComponent, TruncatePipe],
providers: [ providers: [
{provide: TruncatableService, useValue: {}}, { provide: TruncatableService, useValue: {} },
{provide: DSONameService, useClass: DSONameServiceMock}, { provide: DSONameService, useClass: DSONameServiceMock },
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }, { provide: APP_CONFIG, useValue: enviromentNoThumbs },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(JournalVolumeSearchResultListElementComponent, { }).overrideComponent(JournalVolumeSearchResultListElementComponent, {
set: {changeDetection: ChangeDetectionStrategy.Default}, set: { changeDetection: ChangeDetectionStrategy.Default },
}).compileComponents(); }).compileComponents();
})); }));

View File

@@ -141,14 +141,14 @@ describe('JournalSearchResultListElementComponent', () => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [JournalSearchResultListElementComponent, TruncatePipe], declarations: [JournalSearchResultListElementComponent, TruncatePipe],
providers: [ providers: [
{provide: TruncatableService, useValue: {}}, { provide: TruncatableService, useValue: {} },
{provide: DSONameService, useClass: DSONameServiceMock}, { provide: DSONameService, useClass: DSONameServiceMock },
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }, { provide: APP_CONFIG, useValue: enviromentNoThumbs },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(JournalSearchResultListElementComponent, { }).overrideComponent(JournalSearchResultListElementComponent, {
set: {changeDetection: ChangeDetectionStrategy.Default}, set: { changeDetection: ChangeDetectionStrategy.Default },
}).compileComponents(); }).compileComponents();
})); }));

View File

@@ -66,7 +66,7 @@ export class JournalEntitiesModule {
static withEntryComponents() { static withEntryComponents() {
return { return {
ngModule: JournalEntitiesModule, ngModule: JournalEntitiesModule,
providers: ENTRY_COMPONENTS.map((component) => ({provide: component})), providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })),
}; };
} }

View File

@@ -158,14 +158,14 @@ describe('OrgUnitSearchResultListElementComponent', () => {
)], )],
declarations: [OrgUnitSearchResultListElementComponent, TruncatePipe], declarations: [OrgUnitSearchResultListElementComponent, TruncatePipe],
providers: [ providers: [
{provide: TruncatableService, useValue: {}}, { provide: TruncatableService, useValue: {} },
{provide: DSONameService, useClass: DSONameServiceMock}, { provide: DSONameService, useClass: DSONameServiceMock },
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }, { provide: APP_CONFIG, useValue: enviromentNoThumbs },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(OrgUnitSearchResultListElementComponent, { }).overrideComponent(OrgUnitSearchResultListElementComponent, {
set: {changeDetection: ChangeDetectionStrategy.Default}, set: { changeDetection: ChangeDetectionStrategy.Default },
}).compileComponents(); }).compileComponents();
})); }));

View File

@@ -158,14 +158,14 @@ describe('PersonSearchResultListElementComponent', () => {
)], )],
declarations: [PersonSearchResultListElementComponent, TruncatePipe], declarations: [PersonSearchResultListElementComponent, TruncatePipe],
providers: [ providers: [
{provide: TruncatableService, useValue: {}}, { provide: TruncatableService, useValue: {} },
{provide: DSONameService, useClass: DSONameServiceMock}, { provide: DSONameService, useClass: DSONameServiceMock },
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }, { provide: APP_CONFIG, useValue: enviromentNoThumbs },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(PersonSearchResultListElementComponent, { }).overrideComponent(PersonSearchResultListElementComponent, {
set: {changeDetection: ChangeDetectionStrategy.Default}, set: { changeDetection: ChangeDetectionStrategy.Default },
}).compileComponents(); }).compileComponents();
})); }));

View File

@@ -140,15 +140,15 @@ describe('ProjectSearchResultListElementComponent', () => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ProjectSearchResultListElementComponent, TruncatePipe], declarations: [ProjectSearchResultListElementComponent, TruncatePipe],
providers: [ providers: [
{provide: TruncatableService, useValue: {}}, { provide: TruncatableService, useValue: {} },
{provide: DSONameService, useClass: DSONameServiceMock}, { provide: DSONameService, useClass: DSONameServiceMock },
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }, { provide: APP_CONFIG, useValue: enviromentNoThumbs },
], ],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(ProjectSearchResultListElementComponent, { }).overrideComponent(ProjectSearchResultListElementComponent, {
set: {changeDetection: ChangeDetectionStrategy.Default}, set: { changeDetection: ChangeDetectionStrategy.Default },
}).compileComponents(); }).compileComponents();
})); }));

View File

@@ -123,7 +123,7 @@ describe('PersonSearchResultListElementSubmissionComponent', () => {
{ provide: NgbModal, useValue: {} }, { provide: NgbModal, useValue: {} },
{ provide: ItemDataService, useValue: {} }, { provide: ItemDataService, useValue: {} },
{ provide: SelectableListService, useValue: {} }, { provide: SelectableListService, useValue: {} },
{ provide: Store, useValue: {}}, { provide: Store, useValue: {} },
{ provide: ObjectCacheService, useValue: {} }, { provide: ObjectCacheService, useValue: {} },
{ provide: UUIDService, useValue: {} }, { provide: UUIDService, useValue: {} },
{ provide: RemoteDataBuildService, useValue: {} }, { provide: RemoteDataBuildService, useValue: {} },
@@ -203,7 +203,7 @@ describe('PersonSearchResultListElementSubmissionComponent', () => {
{ provide: NgbModal, useValue: {} }, { provide: NgbModal, useValue: {} },
{ provide: ItemDataService, useValue: {} }, { provide: ItemDataService, useValue: {} },
{ provide: SelectableListService, useValue: {} }, { provide: SelectableListService, useValue: {} },
{ provide: Store, useValue: {}}, { provide: Store, useValue: {} },
{ provide: ObjectCacheService, useValue: {} }, { provide: ObjectCacheService, useValue: {} },
{ provide: UUIDService, useValue: {} }, { provide: UUIDService, useValue: {} },
{ provide: RemoteDataBuildService, useValue: {} }, { provide: RemoteDataBuildService, useValue: {} },

View File

@@ -51,7 +51,7 @@ describe('ForgotPasswordFormComponent', () => {
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
route = {data: observableOf({registration: createSuccessfulRemoteDataObject(registration)})}; route = { data: observableOf({ registration: createSuccessfulRemoteDataObject(registration) }) };
router = new RouterStub(); router = new RouterStub();
notificationsService = new NotificationsServiceStub(); notificationsService = new NotificationsServiceStub();
@@ -67,12 +67,12 @@ describe('ForgotPasswordFormComponent', () => {
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule], imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule],
declarations: [ForgotPasswordFormComponent], declarations: [ForgotPasswordFormComponent],
providers: [ providers: [
{provide: Router, useValue: router}, { provide: Router, useValue: router },
{provide: ActivatedRoute, useValue: route}, { provide: ActivatedRoute, useValue: route },
{provide: Store, useValue: store}, { provide: Store, useValue: store },
{provide: EPersonDataService, useValue: ePersonDataService}, { provide: EPersonDataService, useValue: ePersonDataService },
{provide: UntypedFormBuilder, useValue: new UntypedFormBuilder()}, { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() },
{provide: NotificationsService, useValue: notificationsService}, { provide: NotificationsService, useValue: notificationsService },
], ],
schemas: [CUSTOM_ELEMENTS_SCHEMA], schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents(); }).compileComponents();

View File

@@ -12,7 +12,7 @@ import { ThemedForgotPasswordFormComponent } from './forgot-password-form/themed
{ {
path: '', path: '',
component: ThemedForgotEmailComponent, component: ThemedForgotEmailComponent,
data: {title: 'forgot-password.title'}, data: { title: 'forgot-password.title' },
}, },
{ {
path: ':token', path: ':token',

View File

@@ -95,7 +95,7 @@ export class TopLevelCommunityListComponent implements OnInit, OnDestroy {
return this.cds.findTop({ return this.cds.findTop({
currentPage: currentPagination.currentPage, currentPage: currentPagination.currentPage,
elementsPerPage: currentPagination.pageSize, elementsPerPage: currentPagination.pageSize,
sort: {field: currentSort.field, direction: currentSort.direction}, sort: { field: currentSort.field, direction: currentSort.direction },
}); });
}), }),
).subscribe((results) => { ).subscribe((results) => {

View File

@@ -61,8 +61,8 @@ describe('BitstreamRequestACopyPageComponent', () => {
eperson = Object.assign(new EPerson(), { eperson = Object.assign(new EPerson(), {
email: 'test@mail.org', email: 'test@mail.org',
metadata: { metadata: {
'eperson.firstname': [{value: 'Test'}], 'eperson.firstname': [{ value: 'Test' }],
'eperson.lastname': [{value: 'User'}], 'eperson.lastname': [{ value: 'User' }],
}, },
}); });
authService = jasmine.createSpyObj('authService', { authService = jasmine.createSpyObj('authService', {
@@ -83,13 +83,13 @@ describe('BitstreamRequestACopyPageComponent', () => {
notificationsService = new NotificationsServiceStub(); notificationsService = new NotificationsServiceStub();
item = Object.assign(new Item(), {uuid: 'item-uuid'}); item = Object.assign(new Item(), { uuid: 'item-uuid' });
bitstream = Object.assign(new Bitstream(), { bitstream = Object.assign(new Bitstream(), {
uuid: 'bitstreamUuid', uuid: 'bitstreamUuid',
_links: { _links: {
content: {href: 'bitstream-content-link'}, content: { href: 'bitstream-content-link' },
self: {href: 'bitstream-self-link'}, self: { href: 'bitstream-self-link' },
}, },
}); });
@@ -116,15 +116,15 @@ describe('BitstreamRequestACopyPageComponent', () => {
imports: [CommonModule, TranslateModule.forRoot(), FormsModule, ReactiveFormsModule], imports: [CommonModule, TranslateModule.forRoot(), FormsModule, ReactiveFormsModule],
declarations: [BitstreamRequestACopyPageComponent], declarations: [BitstreamRequestACopyPageComponent],
providers: [ providers: [
{provide: Location, useValue: location}, { provide: Location, useValue: location },
{provide: ActivatedRoute, useValue: activatedRoute}, { provide: ActivatedRoute, useValue: activatedRoute },
{provide: Router, useValue: router}, { provide: Router, useValue: router },
{provide: AuthorizationDataService, useValue: authorizationService}, { provide: AuthorizationDataService, useValue: authorizationService },
{provide: AuthService, useValue: authService}, { provide: AuthService, useValue: authService },
{provide: ItemRequestDataService, useValue: itemRequestDataService}, { provide: ItemRequestDataService, useValue: itemRequestDataService },
{provide: NotificationsService, useValue: notificationsService}, { provide: NotificationsService, useValue: notificationsService },
{provide: DSONameService, useValue: new DSONameServiceMock()}, { provide: DSONameService, useValue: new DSONameServiceMock() },
{provide: BitstreamDataService, useValue: bitstreamDataService}, { provide: BitstreamDataService, useValue: bitstreamDataService },
], ],
}) })
.compileComponents(); .compileComponents();

View File

@@ -133,7 +133,7 @@ export class BitstreamRequestACopyPageComponent implements OnInit, OnDestroy {
this.subs.push(observableCombineLatest([this.canDownload$, canRequestCopy$]).subscribe(([canDownload, canRequestCopy]) => { this.subs.push(observableCombineLatest([this.canDownload$, canRequestCopy$]).subscribe(([canDownload, canRequestCopy]) => {
if (!canDownload && !canRequestCopy) { if (!canDownload && !canRequestCopy) {
this.router.navigateByUrl(getForbiddenRoute(), {skipLocationChange: true}); this.router.navigateByUrl(getForbiddenRoute(), { skipLocationChange: true });
} }
})); }));
this.initValues(); this.initValues();
@@ -160,13 +160,13 @@ export class BitstreamRequestACopyPageComponent implements OnInit, OnDestroy {
*/ */
private initValues() { private initValues() {
this.getCurrentUser().pipe(take(1)).subscribe((user) => { this.getCurrentUser().pipe(take(1)).subscribe((user) => {
this.requestCopyForm.patchValue({allfiles: 'true'}); this.requestCopyForm.patchValue({ allfiles: 'true' });
if (hasValue(user)) { if (hasValue(user)) {
this.requestCopyForm.patchValue({name: user.name, email: user.email}); this.requestCopyForm.patchValue({ name: user.name, email: user.email });
} }
}); });
this.bitstream$.pipe(take(1)).subscribe((bitstream) => { this.bitstream$.pipe(take(1)).subscribe((bitstream) => {
this.requestCopyForm.patchValue({allfiles: 'false'}); this.requestCopyForm.patchValue({ allfiles: 'false' });
}); });
} }

View File

@@ -1,13 +1,13 @@
import {hot} from 'jasmine-marbles'; import { hot } from 'jasmine-marbles';
import {RemoteData} from '../../core/data/remote-data'; import { RemoteData } from '../../core/data/remote-data';
import {Item} from '../../core/shared/item.model'; import { Item } from '../../core/shared/item.model';
import { isNotEmpty } from '../../shared/empty.util'; import { isNotEmpty } from '../../shared/empty.util';
import { import {
createFailedRemoteDataObject, createFailedRemoteDataObject,
createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject,
} from '../../shared/remote-data.utils'; } from '../../shared/remote-data.utils';
import {findSuccessfulAccordingTo} from './edit-item-operators'; import { findSuccessfulAccordingTo } from './edit-item-operators';
describe('findSuccessfulAccordingTo', () => { describe('findSuccessfulAccordingTo', () => {
let mockItem1; let mockItem1;

View File

@@ -1,8 +1,8 @@
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
import {first} from 'rxjs/operators'; import { first } from 'rxjs/operators';
import {RemoteData} from '../../core/data/remote-data'; import { RemoteData } from '../../core/data/remote-data';
import {getAllSucceededRemoteData} from '../../core/shared/operators'; import { getAllSucceededRemoteData } from '../../core/shared/operators';
/** /**
* Return first Observable of a RemoteData object that complies to the provided predicate * Return first Observable of a RemoteData object that complies to the provided predicate

View File

@@ -75,7 +75,7 @@ describe('ItemPageComponent', () => {
}, },
], ],
}, },
data: observableOf({dso: createSuccessfulRemoteDataObject(new Item())}), data: observableOf({ dso: createSuccessfulRemoteDataObject(new Item()) }),
}; };
const mockRouter = { const mockRouter = {

View File

@@ -172,7 +172,7 @@ export class ItemAuthorizationsComponent implements OnInit, OnDestroy {
getFirstSucceededRemoteDataWithNotEmptyPayload(), getFirstSucceededRemoteDataWithNotEmptyPayload(),
map((item: Item) => this.linkService.resolveLink( map((item: Item) => this.linkService.resolveLink(
item, item,
followLink('bundles', {findListOptions: {currentPage : page, elementsPerPage: this.bundlesPerPage}}, followLink('bitstreams')), followLink('bundles', { findListOptions: { currentPage : page, elementsPerPage: this.bundlesPerPage } }, followLink('bitstreams')),
)), )),
) as Observable<Item>; ) as Observable<Item>;

View File

@@ -121,7 +121,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
* Actions to perform after the item has been initialized * Actions to perform after the item has been initialized
*/ */
postItemInit(): void { postItemInit(): void {
this.bundles$ = this.itemService.getBundles(this.item.id, new PaginatedSearchOptions({pagination: this.bundlesOptions})).pipe( this.bundles$ = this.itemService.getBundles(this.item.id, new PaginatedSearchOptions({ pagination: this.bundlesOptions })).pipe(
getFirstSucceededRemoteData(), getFirstSucceededRemoteData(),
getRemoteDataPayload(), getRemoteDataPayload(),
map((bundlePage: PaginatedList<Bundle>) => bundlePage.page), map((bundlePage: PaginatedList<Bundle>) => bundlePage.page),
@@ -226,7 +226,7 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
* Shows a notification to remind the user that they can undo this * Shows a notification to remind the user that they can undo this
*/ */
discard() { discard() {
const undoNotification = this.notificationsService.info(this.getNotificationTitle('discarded'), this.getNotificationContent('discarded'), {timeOut: this.discardTimeOut}); const undoNotification = this.notificationsService.info(this.getNotificationTitle('discarded'), this.getNotificationContent('discarded'), { timeOut: this.discardTimeOut });
this.objectUpdatesService.discardAllFieldUpdates(this.url, undoNotification); this.objectUpdatesService.discardAllFieldUpdates(this.url, undoNotification);
} }

View File

@@ -30,7 +30,7 @@ export class ItemEditBitstreamBundleComponent implements OnInit {
/** /**
* The view on the bundle information and bitstreams * The view on the bundle information and bitstreams
*/ */
@ViewChild('bundleView', {static: true}) bundleView; @ViewChild('bundleView', { static: true }) bundleView;
/** /**
* The bundle to display bitstreams for * The bundle to display bitstreams for

View File

@@ -60,7 +60,7 @@ export class PaginatedDragAndDropBitstreamListComponent extends AbstractPaginate
initializeObjectsRD(): void { initializeObjectsRD(): void {
this.objectsRD$ = this.currentPage$.pipe( this.objectsRD$ = this.currentPage$.pipe(
switchMap((page: PaginationComponentOptions) => { switchMap((page: PaginationComponentOptions) => {
const paginatedOptions = new PaginatedSearchOptions({pagination: Object.assign({}, page)}); const paginatedOptions = new PaginatedSearchOptions({ pagination: Object.assign({}, page) });
return this.bundleService.getBitstreamsEndpoint(this.bundle.id, paginatedOptions).pipe( return this.bundleService.getBitstreamsEndpoint(this.bundle.id, paginatedOptions).pipe(
switchMap((href) => this.requestService.hasByHref$(href)), switchMap((href) => this.requestService.hasByHref$(href)),
switchMap(() => this.bundleService.getBitstreams( switchMap(() => this.bundleService.getBitstreams(

View File

@@ -19,7 +19,7 @@ export class ItemEditBitstreamDragHandleComponent implements OnInit {
/** /**
* The view on the drag-handle * The view on the drag-handle
*/ */
@ViewChild('handleView', {static: true}) handleView; @ViewChild('handleView', { static: true }) handleView;
constructor(private viewContainerRef: ViewContainerRef) { constructor(private viewContainerRef: ViewContainerRef) {
} }

View File

@@ -38,7 +38,7 @@ export class ItemEditBitstreamComponent implements OnChanges, OnInit {
/** /**
* The view on the bitstream * The view on the bitstream
*/ */
@ViewChild('bitstreamView', {static: true}) bitstreamView; @ViewChild('bitstreamView', { static: true }) bitstreamView;
/** /**
* The current field, value and state of the bitstream * The current field, value and state of the bitstream

View File

@@ -26,7 +26,7 @@ describe('ItemCurateComponent', () => {
const item = Object.assign(new Item(), { const item = Object.assign(new Item(), {
handle: '123456789/1', handle: '123456789/1',
metadata: {'dc.title': ['Item Name']}, metadata: { 'dc.title': ['Item Name'] },
}); });
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
@@ -46,8 +46,8 @@ describe('ItemCurateComponent', () => {
imports: [TranslateModule.forRoot()], imports: [TranslateModule.forRoot()],
declarations: [ItemCurateComponent], declarations: [ItemCurateComponent],
providers: [ providers: [
{provide: ActivatedRoute, useValue: routeStub}, { provide: ActivatedRoute, useValue: routeStub },
{provide: DSONameService, useValue: dsoNameService}, { provide: DSONameService, useValue: dsoNameService },
], ],
schemas: [CUSTOM_ELEMENTS_SCHEMA], schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents(); }).compileComponents();

View File

@@ -3,7 +3,7 @@ import {
Input, Input,
} from '@angular/core'; } from '@angular/core';
import {ItemOperation} from './itemOperation.model'; import { ItemOperation } from './itemOperation.model';
@Component({ @Component({
selector: 'ds-item-operation', selector: 'ds-item-operation',

View File

@@ -55,9 +55,9 @@ describe('ItemRegisterDoiComponent', () => {
}); });
mockIdentifierDataService = jasmine.createSpyObj('mockIdentifierDataService', { mockIdentifierDataService = jasmine.createSpyObj('mockIdentifierDataService', {
getIdentifierDataFor: createSuccessfulRemoteDataObject$({'identifiers': []}), getIdentifierDataFor: createSuccessfulRemoteDataObject$({ 'identifiers': [] }),
getIdentifierRegistrationConfiguration: createSuccessfulRemoteDataObject$('true'), getIdentifierRegistrationConfiguration: createSuccessfulRemoteDataObject$('true'),
registerIdentifier: createSuccessfulRemoteDataObject$({'identifiers': []}), registerIdentifier: createSuccessfulRemoteDataObject$({ 'identifiers': [] }),
}); });
mockItemDataService = jasmine.createSpyObj('mockItemDataService', { mockItemDataService = jasmine.createSpyObj('mockItemDataService', {
@@ -81,7 +81,7 @@ describe('ItemRegisterDoiComponent', () => {
{ provide: ActivatedRoute, useValue: routeStub }, { provide: ActivatedRoute, useValue: routeStub },
{ provide: Router, useValue: routerStub }, { provide: Router, useValue: routerStub },
{ provide: ItemDataService, useValue: mockItemDataService }, { provide: ItemDataService, useValue: mockItemDataService },
{ provide: IdentifierDataService, useValue: mockIdentifierDataService}, { provide: IdentifierDataService, useValue: mockIdentifierDataService },
{ provide: NotificationsService, useValue: notificationsServiceStub }, { provide: NotificationsService, useValue: notificationsServiceStub },
], schemas: [ ], schemas: [
CUSTOM_ELEMENTS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA,

View File

@@ -153,7 +153,7 @@ describe('ItemRelationshipsComponent', () => {
fieldUpdate2 = { fieldUpdate2 = {
field: Object.assign( field: Object.assign(
relationships[1], relationships[1],
{keepLeftVirtualMetadata: true, keepRightVirtualMetadata: false}, { keepLeftVirtualMetadata: true, keepRightVirtualMetadata: false },
), ),
changeType: FieldChangeType.REMOVE, changeType: FieldChangeType.REMOVE,
}; };

View File

@@ -43,7 +43,7 @@ describe('ItemStatusComponent', () => {
}); });
mockIdentifierDataService = jasmine.createSpyObj('mockIdentifierDataService', { mockIdentifierDataService = jasmine.createSpyObj('mockIdentifierDataService', {
getIdentifierDataFor: createSuccessfulRemoteDataObject$({'identifiers': []}), getIdentifierDataFor: createSuccessfulRemoteDataObject$({ 'identifiers': [] }),
getIdentifierRegistrationConfiguration: createSuccessfulRemoteDataObject$('true'), getIdentifierRegistrationConfiguration: createSuccessfulRemoteDataObject$('true'),
}); });

View File

@@ -26,7 +26,7 @@ describe('ItemVersionHistoryComponent', () => {
const activatedRoute = { const activatedRoute = {
parent: { parent: {
parent: { parent: {
data: observableOf({dso: createSuccessfulRemoteDataObject(item)}), data: observableOf({ dso: createSuccessfulRemoteDataObject(item) }),
}, },
}, },
}; };

View File

@@ -3,11 +3,11 @@ import {
TestBed, TestBed,
waitForAsync, waitForAsync,
} from '@angular/core/testing'; } from '@angular/core/testing';
import {By} from '@angular/platform-browser'; import { By } from '@angular/platform-browser';
import {TranslateModule} from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import {Item} from '../../../core/shared/item.model'; import { Item } from '../../../core/shared/item.model';
import {ModifyItemOverviewComponent} from './modify-item-overview.component'; import { ModifyItemOverviewComponent } from './modify-item-overview.component';
let comp: ModifyItemOverviewComponent; let comp: ModifyItemOverviewComponent;
let fixture: ComponentFixture<ModifyItemOverviewComponent>; let fixture: ComponentFixture<ModifyItemOverviewComponent>;

View File

@@ -4,8 +4,8 @@ import {
OnInit, OnInit,
} from '@angular/core'; } from '@angular/core';
import {Item} from '../../../core/shared/item.model'; import { Item } from '../../../core/shared/item.model';
import {MetadataMap} from '../../../core/shared/metadata.models'; import { MetadataMap } from '../../../core/shared/metadata.models';
@Component({ @Component({
selector: 'ds-modify-item-overview', selector: 'ds-modify-item-overview',

View File

@@ -6,15 +6,15 @@ import {
OnInit, OnInit,
Output, Output,
} from '@angular/core'; } from '@angular/core';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
import { import {
APP_CONFIG, APP_CONFIG,
AppConfig, AppConfig,
} from '../../../../config/app-config.interface'; } from '../../../../config/app-config.interface';
import {ObjectUpdatesService} from '../../../core/data/object-updates/object-updates.service'; import { ObjectUpdatesService } from '../../../core/data/object-updates/object-updates.service';
import {Item} from '../../../core/shared/item.model'; import { Item } from '../../../core/shared/item.model';
import {MetadataValue} from '../../../core/shared/metadata.models'; import { MetadataValue } from '../../../core/shared/metadata.models';
@Component({ @Component({
selector: 'ds-virtual-metadata', selector: 'ds-virtual-metadata',

View File

@@ -63,7 +63,7 @@ describe('CollectionsComponent', () => {
declarations: [ CollectionsComponent ], declarations: [ CollectionsComponent ],
providers: [ providers: [
{ provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: DSONameService, useValue: new DSONameServiceMock() },
{ provide: RemoteDataBuildService, useValue: getMockRemoteDataBuildService()}, { provide: RemoteDataBuildService, useValue: getMockRemoteDataBuildService() },
{ provide: CollectionDataService, useValue: collectionDataService }, { provide: CollectionDataService, useValue: collectionDataService },
], ],

View File

@@ -53,7 +53,7 @@ describe('MetadataUriValuesComponent', () => {
declarations: [MetadataUriValuesComponent], declarations: [MetadataUriValuesComponent],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(MetadataUriValuesComponent, { }).overrideComponent(MetadataUriValuesComponent, {
set: {changeDetection: ChangeDetectionStrategy.Default}, set: { changeDetection: ChangeDetectionStrategy.Default },
}).compileComponents(); }).compileComponents();
})); }));

View File

@@ -53,7 +53,7 @@ describe('MetadataValuesComponent', () => {
declarations: [MetadataValuesComponent], declarations: [MetadataValuesComponent],
schemas: [NO_ERRORS_SCHEMA], schemas: [NO_ERRORS_SCHEMA],
}).overrideComponent(MetadataValuesComponent, { }).overrideComponent(MetadataValuesComponent, {
set: {changeDetection: ChangeDetectionStrategy.Default}, set: { changeDetection: ChangeDetectionStrategy.Default },
}).compileComponents(); }).compileComponents();
})); }));
@@ -80,7 +80,7 @@ describe('MetadataValuesComponent', () => {
}); });
it('should correctly detect a pattern on string containing "test"', () => { it('should correctly detect a pattern on string containing "test"', () => {
const mdValue = {value: 'This is a test value'} as MetadataValue; const mdValue = { value: 'This is a test value' } as MetadataValue;
expect(comp.hasLink(mdValue)).toBe(true); expect(comp.hasLink(mdValue)).toBe(true);
}); });

Some files were not shown because too many files have changed in this diff Show More