mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 14:33:03 +00:00
[DURACOM-191] fix lint errors
This commit is contained in:
@@ -17,11 +17,11 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|||||||
import { take } from 'rxjs/operators';
|
import { take } from 'rxjs/operators';
|
||||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||||
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
||||||
import { FormsModule } from "@angular/forms";
|
import { FormsModule } from '@angular/forms';
|
||||||
import { UiSwitchModule } from "ngx-ui-switch";
|
import { UiSwitchModule } from 'ngx-ui-switch';
|
||||||
import {
|
import {
|
||||||
FileDropzoneNoUploaderComponent
|
FileDropzoneNoUploaderComponent
|
||||||
} from "../../shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component";
|
} from '../../shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-batch-import-page',
|
selector: 'ds-batch-import-page',
|
||||||
|
@@ -18,6 +18,7 @@ import { FormService } from '../../../../shared/form/form.service';
|
|||||||
import { getMockFormService } from '../../../../shared/mocks/form-service.mock';
|
import { getMockFormService } from '../../../../shared/mocks/form-service.mock';
|
||||||
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
||||||
import { FormatFormComponent } from '../format-form/format-form.component';
|
import { FormatFormComponent } from '../format-form/format-form.component';
|
||||||
|
import { getMockFormBuilderService } from '../../../../shared/mocks/form-builder-service.mock';
|
||||||
|
|
||||||
describe('AddBitstreamFormatComponent', () => {
|
describe('AddBitstreamFormatComponent', () => {
|
||||||
let comp: AddBitstreamFormatComponent;
|
let comp: AddBitstreamFormatComponent;
|
||||||
@@ -37,15 +38,6 @@ describe('AddBitstreamFormatComponent', () => {
|
|||||||
let notificationService: NotificationsServiceStub;
|
let notificationService: NotificationsServiceStub;
|
||||||
let bitstreamFormatDataService: BitstreamFormatDataService;
|
let bitstreamFormatDataService: BitstreamFormatDataService;
|
||||||
|
|
||||||
const formBuilderServiceStub = {
|
|
||||||
createFormGroup: () => {
|
|
||||||
return {
|
|
||||||
patchValue: () => { },
|
|
||||||
reset(_value?: any, _options?: { onlySelf?: boolean; emitEvent?: boolean; }): void { },
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const initAsync = () => {
|
const initAsync = () => {
|
||||||
router = new RouterStub();
|
router = new RouterStub();
|
||||||
notificationService = new NotificationsServiceStub();
|
notificationService = new NotificationsServiceStub();
|
||||||
@@ -61,7 +53,7 @@ describe('AddBitstreamFormatComponent', () => {
|
|||||||
{ provide: NotificationsService, useValue: notificationService },
|
{ provide: NotificationsService, useValue: notificationService },
|
||||||
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
|
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
|
||||||
{ provide: FormService, useValue: getMockFormService() },
|
{ provide: FormService, useValue: getMockFormService() },
|
||||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub },
|
{ provide: FormBuilderService, useValue: getMockFormBuilderService() },
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
})
|
})
|
||||||
@@ -108,7 +100,7 @@ describe('AddBitstreamFormatComponent', () => {
|
|||||||
{ provide: NotificationsService, useValue: notificationService },
|
{ provide: NotificationsService, useValue: notificationService },
|
||||||
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
|
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
|
||||||
{ provide: FormService, useValue: getMockFormService() },
|
{ provide: FormService, useValue: getMockFormService() },
|
||||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub },
|
{ provide: FormBuilderService, useValue: getMockFormBuilderService() },
|
||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||||
})
|
})
|
||||||
|
@@ -8,7 +8,7 @@ import { I18nBreadcrumbResolver } from '../../../core/breadcrumbs/i18n-breadcrum
|
|||||||
const BITSTREAMFORMAT_EDIT_PATH = ':id/edit';
|
const BITSTREAMFORMAT_EDIT_PATH = ':id/edit';
|
||||||
const BITSTREAMFORMAT_ADD_PATH = 'add';
|
const BITSTREAMFORMAT_ADD_PATH = 'add';
|
||||||
|
|
||||||
const providers = [BitstreamFormatsResolver]
|
const providers = [BitstreamFormatsResolver];
|
||||||
|
|
||||||
export const ROUTES: Route[] = [
|
export const ROUTES: Route[] = [
|
||||||
{
|
{
|
||||||
|
@@ -13,8 +13,8 @@ import { NoContent } from '../../../core/shared/NoContent.model';
|
|||||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||||
import { FindListOptions } from '../../../core/data/find-list-options.model';
|
import { FindListOptions } from '../../../core/data/find-list-options.model';
|
||||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||||
import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
|
import { AsyncPipe, NgForOf, NgIf } from '@angular/common';
|
||||||
import { PaginationComponent } from "../../../shared/pagination/pagination.component";
|
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component renders a list of bitstream formats
|
* This component renders a list of bitstream formats
|
||||||
|
@@ -30,6 +30,7 @@ import { ConfigurationProperty } from '../../../core/shared/configuration-proper
|
|||||||
import { FormBuilderService } from 'src/app/shared/form/builder/form-builder.service';
|
import { FormBuilderService } from 'src/app/shared/form/builder/form-builder.service';
|
||||||
import { MetadataSchemaFormComponent } from './metadata-schema-form/metadata-schema-form.component';
|
import { MetadataSchemaFormComponent } from './metadata-schema-form/metadata-schema-form.component';
|
||||||
import { RouterLink } from '@angular/router';
|
import { RouterLink } from '@angular/router';
|
||||||
|
import { getMockFormBuilderService } from '../../../shared/mocks/form-builder-service.mock';
|
||||||
|
|
||||||
describe('MetadataRegistryComponent', () => {
|
describe('MetadataRegistryComponent', () => {
|
||||||
let comp: MetadataRegistryComponent;
|
let comp: MetadataRegistryComponent;
|
||||||
@@ -86,15 +87,6 @@ describe('MetadataRegistryComponent', () => {
|
|||||||
}))
|
}))
|
||||||
});
|
});
|
||||||
|
|
||||||
const formBuilderServiceStub = {
|
|
||||||
createFormGroup: () => {
|
|
||||||
return {
|
|
||||||
patchValue: () => { },
|
|
||||||
reset(_value?: any, _options?: { onlySelf?: boolean; emitEvent?: boolean; }): void { },
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const mockGroupService = jasmine.createSpyObj('groupService',
|
const mockGroupService = jasmine.createSpyObj('groupService',
|
||||||
{
|
{
|
||||||
// findByHref: jasmine.createSpy('findByHref'),
|
// findByHref: jasmine.createSpy('findByHref'),
|
||||||
@@ -136,7 +128,7 @@ describe('MetadataRegistryComponent', () => {
|
|||||||
provide: SearchConfigurationService,
|
provide: SearchConfigurationService,
|
||||||
useValue: new SearchConfigurationServiceStub(),
|
useValue: new SearchConfigurationServiceStub(),
|
||||||
},
|
},
|
||||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub },
|
{ provide: FormBuilderService, useValue: getMockFormBuilderService() },
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
})
|
})
|
||||||
|
@@ -11,6 +11,7 @@ import { FormBuilderService } from '../../../../shared/form/builder/form-builder
|
|||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||||
import { FormComponent } from '../../../../shared/form/form.component';
|
import { FormComponent } from '../../../../shared/form/form.component';
|
||||||
|
import { getMockFormBuilderService } from '../../../../shared/mocks/form-builder-service.mock';
|
||||||
|
|
||||||
describe('MetadataSchemaFormComponent', () => {
|
describe('MetadataSchemaFormComponent', () => {
|
||||||
let component: MetadataSchemaFormComponent;
|
let component: MetadataSchemaFormComponent;
|
||||||
@@ -25,16 +26,6 @@ describe('MetadataSchemaFormComponent', () => {
|
|||||||
},
|
},
|
||||||
clearMetadataSchemaRequests: () => observableOf(undefined)
|
clearMetadataSchemaRequests: () => observableOf(undefined)
|
||||||
};
|
};
|
||||||
const formBuilderServiceStub = {
|
|
||||||
createFormGroup: () => {
|
|
||||||
return {
|
|
||||||
patchValue: () => {
|
|
||||||
},
|
|
||||||
reset(_value?: any, _options?: { onlySelf?: boolean; emitEvent?: boolean; }): void {
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/* eslint-enable no-empty, @typescript-eslint/no-empty-function */
|
/* eslint-enable no-empty, @typescript-eslint/no-empty-function */
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
@@ -42,7 +33,7 @@ describe('MetadataSchemaFormComponent', () => {
|
|||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataSchemaFormComponent, EnumKeysPipe],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataSchemaFormComponent, EnumKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RegistryService, useValue: registryServiceStub },
|
{ provide: RegistryService, useValue: registryServiceStub },
|
||||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub }
|
{ provide: FormBuilderService, useValue: getMockFormBuilderService() }
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
})
|
})
|
||||||
|
@@ -13,6 +13,7 @@ import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|||||||
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
||||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||||
import { FormComponent } from '../../../../shared/form/form.component';
|
import { FormComponent } from '../../../../shared/form/form.component';
|
||||||
|
import { getMockFormBuilderService } from '../../../../shared/mocks/form-builder-service.mock';
|
||||||
|
|
||||||
describe('MetadataFieldFormComponent', () => {
|
describe('MetadataFieldFormComponent', () => {
|
||||||
let component: MetadataFieldFormComponent;
|
let component: MetadataFieldFormComponent;
|
||||||
@@ -36,16 +37,6 @@ describe('MetadataFieldFormComponent', () => {
|
|||||||
},
|
},
|
||||||
clearMetadataFieldRequests: () => observableOf(undefined)
|
clearMetadataFieldRequests: () => observableOf(undefined)
|
||||||
};
|
};
|
||||||
const formBuilderServiceStub = {
|
|
||||||
createFormGroup: () => {
|
|
||||||
return {
|
|
||||||
patchValue: () => {
|
|
||||||
},
|
|
||||||
reset(_value?: any, _options?: { onlySelf?: boolean; emitEvent?: boolean; }): void {
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/* eslint-enable no-empty, @typescript-eslint/no-empty-function */
|
/* eslint-enable no-empty, @typescript-eslint/no-empty-function */
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
@@ -53,7 +44,7 @@ describe('MetadataFieldFormComponent', () => {
|
|||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataFieldFormComponent, EnumKeysPipe],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataFieldFormComponent, EnumKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RegistryService, useValue: registryServiceStub },
|
{ provide: RegistryService, useValue: registryServiceStub },
|
||||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub }
|
{ provide: FormBuilderService, useValue: getMockFormBuilderService() }
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
})
|
})
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { RegistryService } from '../../../core/registry/registry.service';
|
import { RegistryService } from '../../../core/registry/registry.service';
|
||||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||||
import {
|
import {
|
||||||
BehaviorSubject,
|
BehaviorSubject,
|
||||||
combineLatest as observableCombineLatest,
|
combineLatest as observableCombineLatest,
|
||||||
|
@@ -12,7 +12,7 @@ import { AuthServiceStub } from '../../shared/testing/auth-service.stub';
|
|||||||
import { AuthService } from '../../core/auth/auth.service';
|
import { AuthService } from '../../core/auth/auth.service';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
|
||||||
@@ -50,6 +50,12 @@ describe('AdminSidebarComponent', () => {
|
|||||||
children: []
|
children: []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const mockNgbModal = {
|
||||||
|
open: jasmine.createSpy('open').and.returnValue(
|
||||||
|
{ componentInstance: {}, closed: observableOf({})} as NgbModalRef
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
authorizationService = jasmine.createSpyObj('authorizationService', {
|
authorizationService = jasmine.createSpyObj('authorizationService', {
|
||||||
@@ -68,12 +74,7 @@ describe('AdminSidebarComponent', () => {
|
|||||||
{ provide: AuthorizationDataService, useValue: authorizationService },
|
{ provide: AuthorizationDataService, useValue: authorizationService },
|
||||||
{ provide: ScriptDataService, useValue: scriptService },
|
{ provide: ScriptDataService, useValue: scriptService },
|
||||||
{ provide: ActivatedRoute, useValue: routeStub },
|
{ provide: ActivatedRoute, useValue: routeStub },
|
||||||
{
|
{ provide: NgbModal, useValue: mockNgbModal }
|
||||||
provide: NgbModal, useValue: {
|
|
||||||
open: () => {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
}).overrideComponent(AdminSidebarComponent, {
|
}).overrideComponent(AdminSidebarComponent, {
|
||||||
|
@@ -29,7 +29,6 @@ import { getMockLinkService } from '../../../../../shared/mocks/link-service.moc
|
|||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
||||||
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
||||||
import { WorkflowItemAdminWorkflowActionsComponent } from '../../actions/workflow-item/workflow-item-admin-workflow-actions.component';
|
|
||||||
import { AuthService } from '../../../../../core/auth/auth.service';
|
import { AuthService } from '../../../../../core/auth/auth.service';
|
||||||
import { AuthServiceMock } from '../../../../../shared/mocks/auth.service.mock';
|
import { AuthServiceMock } from '../../../../../shared/mocks/auth.service.mock';
|
||||||
import { AuthorizationDataServiceStub } from '../../../../../shared/testing/authorization-service.stub';
|
import { AuthorizationDataServiceStub } from '../../../../../shared/testing/authorization-service.stub';
|
||||||
|
@@ -31,9 +31,9 @@ import { RequestService } from '../../../core/data/request.service';
|
|||||||
import { environment } from '../../../../environments/environment';
|
import { environment } from '../../../../environments/environment';
|
||||||
import { FieldUpdate } from '../../../core/data/object-updates/field-update.model';
|
import { FieldUpdate } from '../../../core/data/object-updates/field-update.model';
|
||||||
import { FieldUpdates } from '../../../core/data/object-updates/field-updates.model';
|
import { FieldUpdates } from '../../../core/data/object-updates/field-updates.model';
|
||||||
import { ThemedLoadingComponent } from "../../../shared/loading/themed-loading.component";
|
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
|
||||||
import { FormComponent } from "../../../shared/form/form.component";
|
import { FormComponent } from '../../../shared/form/form.component';
|
||||||
import { CollectionSourceControlsComponent } from "./collection-source-controls/collection-source-controls.component";
|
import { CollectionSourceControlsComponent } from './collection-source-controls/collection-source-controls.component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component for managing the content source of the collection
|
* Component for managing the content source of the collection
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import { Route, RouterModule } from '@angular/router';
|
import { Route } from '@angular/router';
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CollectionItemMapperComponent } from '../collection-item-mapper/collection-item-mapper.component';
|
import { CollectionItemMapperComponent } from '../collection-item-mapper/collection-item-mapper.component';
|
||||||
import { EditCollectionPageComponent } from './edit-collection-page.component';
|
import { EditCollectionPageComponent } from './edit-collection-page.component';
|
||||||
import { CollectionMetadataComponent } from './collection-metadata/collection-metadata.component';
|
import { CollectionMetadataComponent } from './collection-metadata/collection-metadata.component';
|
||||||
|
@@ -15,11 +15,11 @@ import { PaginationService } from '../../core/pagination/pagination.service';
|
|||||||
import { switchMap } from 'rxjs/operators';
|
import { switchMap } from 'rxjs/operators';
|
||||||
import { hasValue } from '../../shared/empty.util';
|
import { hasValue } from '../../shared/empty.util';
|
||||||
import { ObjectCollectionComponent } from '../../shared/object-collection/object-collection.component';
|
import { ObjectCollectionComponent } from '../../shared/object-collection/object-collection.component';
|
||||||
import { ErrorComponent } from "../../shared/error/error.component";
|
import { ErrorComponent } from '../../shared/error/error.component';
|
||||||
import { ThemedLoadingComponent } from "../../shared/loading/themed-loading.component";
|
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||||
import { AsyncPipe, NgIf } from "@angular/common";
|
import { AsyncPipe, NgIf } from '@angular/common';
|
||||||
import { TranslateModule } from "@ngx-translate/core";
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { VarDirective } from "../../shared/utils/var.directive";
|
import { VarDirective } from '../../shared/utils/var.directive';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-community-page-sub-collection-list',
|
selector: 'ds-community-page-sub-collection-list',
|
||||||
|
@@ -6,7 +6,6 @@ import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
|||||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||||
import { Bundle } from '../shared/bundle.model';
|
import { Bundle } from '../shared/bundle.model';
|
||||||
import { BUNDLE } from '../shared/bundle.resource-type';
|
|
||||||
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 { PaginatedList } from './paginated-list.model';
|
import { PaginatedList } from './paginated-list.model';
|
||||||
@@ -22,7 +21,6 @@ import { PatchData, PatchDataImpl } from './base/patch-data';
|
|||||||
import { DSOChangeAnalyzer } from './dso-change-analyzer.service';
|
import { DSOChangeAnalyzer } from './dso-change-analyzer.service';
|
||||||
import { RestRequestMethod } from './rest-request-method';
|
import { RestRequestMethod } from './rest-request-method';
|
||||||
import { Operation } from 'fast-json-patch';
|
import { Operation } from 'fast-json-patch';
|
||||||
import { dataService } from './base/data-service.decorator';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A service to retrieve {@link Bundle}s from the REST API
|
* A service to retrieve {@link Bundle}s from the REST API
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { importProvidersFrom, makeEnvironmentProviders } from '@angular/core';
|
import { makeEnvironmentProviders } from '@angular/core';
|
||||||
import { DspaceRestService } from './dspace-rest/dspace-rest.service';
|
import { DspaceRestService } from './dspace-rest/dspace-rest.service';
|
||||||
import { MOCK_RESPONSE_MAP, ResponseMapMock } from '../shared/mocks/dspace-rest/mocks/response-map.mock';
|
import { MOCK_RESPONSE_MAP, ResponseMapMock } from '../shared/mocks/dspace-rest/mocks/response-map.mock';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
@@ -70,12 +70,6 @@ import { FlatBrowseDefinition } from './shared/flat-browse-definition.model';
|
|||||||
import { ValueListBrowseDefinition } from './shared/value-list-browse-definition.model';
|
import { ValueListBrowseDefinition } from './shared/value-list-browse-definition.model';
|
||||||
import { NonHierarchicalBrowseDefinition } from './shared/non-hierarchical-browse-definition';
|
import { NonHierarchicalBrowseDefinition } from './shared/non-hierarchical-browse-definition';
|
||||||
import { BulkAccessConditionOptions } from './config/models/bulk-access-condition-options.model';
|
import { BulkAccessConditionOptions } from './config/models/bulk-access-condition-options.model';
|
||||||
import { Action, StoreConfig, StoreModule } from '@ngrx/store';
|
|
||||||
import { EffectsModule } from '@ngrx/effects';
|
|
||||||
import { coreReducers } from './core.reducers';
|
|
||||||
import { storeModuleConfig } from '../app.reducer';
|
|
||||||
import { CoreState } from './core-state.model';
|
|
||||||
import { coreEffects } from './core.effects';
|
|
||||||
|
|
||||||
|
|
||||||
export const provideCore = () => {
|
export const provideCore = () => {
|
||||||
|
@@ -12,9 +12,8 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock } from '../../../../shared/mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../../shared/mocks/dso-name.service.mock';
|
||||||
import {
|
|
||||||
JournalIssueSearchResultGridElementComponent
|
|
||||||
} from '../search-result-grid-elements/journal-issue/journal-issue-search-result-grid-element.component';
|
|
||||||
|
|
||||||
const mockItem = Object.assign(new Item(), {
|
const mockItem = Object.assign(new Item(), {
|
||||||
bundles: createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [])),
|
bundles: createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [])),
|
||||||
|
@@ -13,12 +13,8 @@ import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
|||||||
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
||||||
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
||||||
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
||||||
import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component';
|
|
||||||
import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component';
|
|
||||||
import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component';
|
|
||||||
import {
|
|
||||||
TruncatablePartComponent
|
|
||||||
} from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component';
|
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ActivatedRouteStub } from '../../../../../shared/testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../../../../shared/testing/active-router.stub';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
@@ -40,21 +40,14 @@ import { mockRouteService } from '../../../../item-page/simple/item-types/shared
|
|||||||
import { BrowseDefinitionDataServiceStub } from '../../../../shared/testing/browse-definition-data-service.stub';
|
import { BrowseDefinitionDataServiceStub } from '../../../../shared/testing/browse-definition-data-service.stub';
|
||||||
import { BrowseDefinitionDataService } from '../../../../core/browse/browse-definition-data.service';
|
import { BrowseDefinitionDataService } from '../../../../core/browse/browse-definition-data.service';
|
||||||
import { mockTruncatableService } from '../../../../shared/mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../../shared/mocks/mock-trucatable.service';
|
||||||
import {
|
|
||||||
ThemedResultsBackButtonComponent
|
|
||||||
} from '../../../../shared/results-back-button/themed-results-back-button.component';
|
|
||||||
import {
|
|
||||||
ThemedItemPageTitleFieldComponent
|
|
||||||
} from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component';
|
|
||||||
import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component';
|
|
||||||
import {
|
|
||||||
MetadataFieldWrapperComponent
|
|
||||||
} from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component';
|
|
||||||
import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component';
|
|
||||||
import { RelatedItemsComponent } from '../../../../item-page/simple/related-items/related-items-component';
|
|
||||||
import {
|
|
||||||
TabbedRelatedEntitiesSearchComponent
|
|
||||||
} from '../../../../item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component';
|
|
||||||
import { APP_CONFIG } from '../../../../../config/app-config.interface';
|
import { APP_CONFIG } from '../../../../../config/app-config.interface';
|
||||||
import {
|
import {
|
||||||
MetadataValuesComponent
|
MetadataValuesComponent
|
||||||
|
@@ -12,7 +12,6 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock } from '../../../../shared/mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../../shared/mocks/dso-name.service.mock';
|
||||||
import { PersonSearchResultGridElementComponent } from '../search-result-grid-elements/person/person-search-result-grid-element.component';
|
|
||||||
|
|
||||||
const mockItem = Object.assign(new Item(), {
|
const mockItem = Object.assign(new Item(), {
|
||||||
bundles: createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [])),
|
bundles: createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [])),
|
||||||
|
@@ -13,9 +13,6 @@ import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
|||||||
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
||||||
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
||||||
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
||||||
import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component';
|
|
||||||
import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component';
|
|
||||||
import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component';
|
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ActivatedRouteStub } from '../../../../../shared/testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../../../../shared/testing/active-router.stub';
|
||||||
|
|
||||||
|
@@ -32,7 +32,6 @@ import { DSONameServiceMock } from '../../../../../shared/mocks/dso-name.service
|
|||||||
import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
||||||
import { environment } from '../../../../../../environments/environment';
|
import { environment } from '../../../../../../environments/environment';
|
||||||
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
||||||
import { OrgUnitInputSuggestionsComponent } from './org-unit-suggestions/org-unit-input-suggestions.component';
|
|
||||||
|
|
||||||
let personListElementComponent: OrgUnitSearchResultListSubmissionElementComponent;
|
let personListElementComponent: OrgUnitSearchResultListSubmissionElementComponent;
|
||||||
let fixture: ComponentFixture<OrgUnitSearchResultListSubmissionElementComponent>;
|
let fixture: ComponentFixture<OrgUnitSearchResultListSubmissionElementComponent>;
|
||||||
|
@@ -26,7 +26,6 @@ import { TruncatableService } from '../../../../../shared/truncatable/truncatabl
|
|||||||
import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe';
|
import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe';
|
||||||
import { PersonSearchResultListSubmissionElementComponent } from './person-search-result-list-submission-element.component';
|
import { PersonSearchResultListSubmissionElementComponent } from './person-search-result-list-submission-element.component';
|
||||||
import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
||||||
import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component';
|
|
||||||
import { CollectionElementLinkType } from '../../../../../shared/object-collection/collection-element-link.type';
|
import { CollectionElementLinkType } from '../../../../../shared/object-collection/collection-element-link.type';
|
||||||
import { AuthService } from '../../../../../core/auth/auth.service';
|
import { AuthService } from '../../../../../core/auth/auth.service';
|
||||||
import { REQUEST } from '@nguniversal/express-engine/tokens';
|
import { REQUEST } from '@nguniversal/express-engine/tokens';
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line max-classes-per-file
|
||||||
import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
@@ -7,7 +8,7 @@ import { RelationshipType } from '../../../../core/shared/item-relationships/rel
|
|||||||
import { Relationship } from '../../../../core/shared/item-relationships/relationship.model';
|
import { Relationship } from '../../../../core/shared/item-relationships/relationship.model';
|
||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
import { EditRelationshipComponent } from './edit-relationship.component';
|
import { EditRelationshipComponent } from './edit-relationship.component';
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
|
||||||
import { createPaginatedList } from '../../../../shared/testing/utils.test';
|
import { createPaginatedList } from '../../../../shared/testing/utils.test';
|
||||||
import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model';
|
import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model';
|
||||||
@@ -30,6 +31,7 @@ let fieldUpdate1;
|
|||||||
let fieldUpdate2;
|
let fieldUpdate2;
|
||||||
let relationships;
|
let relationships;
|
||||||
let relationshipType;
|
let relationshipType;
|
||||||
|
let mockNgbModal;
|
||||||
|
|
||||||
let fixture: ComponentFixture<EditRelationshipComponent>;
|
let fixture: ComponentFixture<EditRelationshipComponent>;
|
||||||
let comp: EditRelationshipComponent;
|
let comp: EditRelationshipComponent;
|
||||||
@@ -121,18 +123,19 @@ describe('EditRelationshipComponent', () => {
|
|||||||
saveRemoveFieldUpdate: jasmine.createSpy('saveRemoveFieldUpdate'),
|
saveRemoveFieldUpdate: jasmine.createSpy('saveRemoveFieldUpdate'),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mockNgbModal = {
|
||||||
|
open: jasmine.createSpy('open').and.returnValue(
|
||||||
|
{ componentInstance: {}, closed: observableOf({})} as NgbModalRef
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
spyOn(objectUpdatesService, 'isSelectedVirtualMetadata').and.callFake((a, b, uuid) => observableOf(itemSelection[uuid]));
|
spyOn(objectUpdatesService, 'isSelectedVirtualMetadata').and.callFake((a, b, uuid) => observableOf(itemSelection[uuid]));
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), EditRelationshipComponent],
|
imports: [TranslateModule.forRoot(), EditRelationshipComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ObjectUpdatesService, useValue: objectUpdatesService },
|
{ provide: ObjectUpdatesService, useValue: objectUpdatesService },
|
||||||
{
|
{ provide: NgbModal, useValue: mockNgbModal },
|
||||||
provide: NgbModal, useValue: {
|
|
||||||
open: () => {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ provide: ThemeService, useValue: getMockThemeService() }
|
{ provide: ThemeService, useValue: getMockThemeService() }
|
||||||
], schemas: [
|
], schemas: [
|
||||||
NO_ERRORS_SCHEMA
|
NO_ERRORS_SCHEMA
|
||||||
|
@@ -10,8 +10,8 @@ import { RemoteData } from '../../../core/data/remote-data';
|
|||||||
import { ResearcherProfile } from '../../../core/profile/model/researcher-profile.model';
|
import { ResearcherProfile } from '../../../core/profile/model/researcher-profile.model';
|
||||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||||
import { OrcidAuthService } from '../../../core/orcid/orcid-auth.service';
|
import { OrcidAuthService } from '../../../core/orcid/orcid-auth.service';
|
||||||
import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
|
import { AsyncPipe, NgForOf, NgIf } from '@angular/common';
|
||||||
import { AlertComponent } from "../../../shared/alert/alert.component";
|
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-orcid-auth',
|
selector: 'ds-orcid-auth',
|
||||||
|
@@ -11,14 +11,14 @@ import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|||||||
import { MenuService } from './shared/menu/menu.service';
|
import { MenuService } from './shared/menu/menu.service';
|
||||||
import { AuthorizationDataService } from './core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from './core/data/feature-authorization/authorization-data.service';
|
||||||
import { ScriptDataService } from './core/data/processes/script-data.service';
|
import { ScriptDataService } from './core/data/processes/script-data.service';
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { MenuServiceStub } from './shared/testing/menu-service.stub';
|
import { MenuServiceStub } from './shared/testing/menu-service.stub';
|
||||||
import { MenuID } from './shared/menu/menu-id.model';
|
import { MenuID } from './shared/menu/menu-id.model';
|
||||||
import { BrowseService } from './core/browse/browse.service';
|
import { BrowseService } from './core/browse/browse.service';
|
||||||
import { cold } from 'jasmine-marbles';
|
import { cold } from 'jasmine-marbles';
|
||||||
import createSpy = jasmine.createSpy;
|
|
||||||
import { createSuccessfulRemoteDataObject$ } from './shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from './shared/remote-data.utils';
|
||||||
import { createPaginatedList } from './shared/testing/utils.test';
|
import { createPaginatedList } from './shared/testing/utils.test';
|
||||||
|
import createSpy = jasmine.createSpy;
|
||||||
|
|
||||||
const BOOLEAN = { t: true, f: false };
|
const BOOLEAN = { t: true, f: false };
|
||||||
const MENU_STATE = {
|
const MENU_STATE = {
|
||||||
@@ -37,6 +37,7 @@ describe('MenuResolver', () => {
|
|||||||
let browseService;
|
let browseService;
|
||||||
let authorizationService;
|
let authorizationService;
|
||||||
let scriptService;
|
let scriptService;
|
||||||
|
let mockNgbModal;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
menuService = new MenuServiceStub();
|
menuService = new MenuServiceStub();
|
||||||
@@ -52,6 +53,11 @@ describe('MenuResolver', () => {
|
|||||||
scriptService = jasmine.createSpyObj('scriptService', {
|
scriptService = jasmine.createSpyObj('scriptService', {
|
||||||
scriptWithNameExistsAndCanExecute: observableOf(true)
|
scriptWithNameExistsAndCanExecute: observableOf(true)
|
||||||
});
|
});
|
||||||
|
mockNgbModal = {
|
||||||
|
open: jasmine.createSpy('open').and.returnValue(
|
||||||
|
{ componentInstance: {}, closed: observableOf({})} as NgbModalRef
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent],
|
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent],
|
||||||
@@ -60,12 +66,7 @@ describe('MenuResolver', () => {
|
|||||||
{ provide: BrowseService, useValue: browseService },
|
{ provide: BrowseService, useValue: browseService },
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService },
|
{ provide: AuthorizationDataService, useValue: authorizationService },
|
||||||
{ provide: ScriptDataService, useValue: scriptService },
|
{ provide: ScriptDataService, useValue: scriptService },
|
||||||
{
|
{ provide: NgbModal, useValue: mockNgbModal }
|
||||||
provide: NgbModal, useValue: {
|
|
||||||
open: () => {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
});
|
});
|
||||||
|
@@ -7,7 +7,7 @@ import { RouterTestingModule } from '@angular/router/testing';
|
|||||||
import { AdminSidebarComponent } from '../../admin/admin-sidebar/admin-sidebar.component';
|
import { AdminSidebarComponent } from '../../admin/admin-sidebar/admin-sidebar.component';
|
||||||
import { MenuService } from '../menu/menu.service';
|
import { MenuService } from '../menu/menu.service';
|
||||||
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { DSOEditMenuResolver } from './dso-edit-menu.resolver';
|
import { DSOEditMenuResolver } from './dso-edit-menu.resolver';
|
||||||
import { DsoVersioningModalService } from './dso-versioning-modal-service/dso-versioning-modal.service';
|
import { DsoVersioningModalService } from './dso-versioning-modal-service/dso-versioning-modal.service';
|
||||||
@@ -39,6 +39,7 @@ describe('DSOEditMenuResolver', () => {
|
|||||||
let researcherProfileService;
|
let researcherProfileService;
|
||||||
let notificationsService;
|
let notificationsService;
|
||||||
let translate;
|
let translate;
|
||||||
|
let mockNgbModal;
|
||||||
|
|
||||||
const dsoRoute = (dso: DSpaceObject) => {
|
const dsoRoute = (dso: DSpaceObject) => {
|
||||||
return {
|
return {
|
||||||
@@ -140,6 +141,11 @@ describe('DSOEditMenuResolver', () => {
|
|||||||
success: {},
|
success: {},
|
||||||
error: {},
|
error: {},
|
||||||
});
|
});
|
||||||
|
mockNgbModal = {
|
||||||
|
open: jasmine.createSpy('open').and.returnValue(
|
||||||
|
{ componentInstance: {}, closed: observableOf({})} as NgbModalRef
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent],
|
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent],
|
||||||
@@ -151,12 +157,7 @@ describe('DSOEditMenuResolver', () => {
|
|||||||
{ provide: ResearcherProfileDataService, useValue: researcherProfileService },
|
{ provide: ResearcherProfileDataService, useValue: researcherProfileService },
|
||||||
{ provide: TranslateService, useValue: translate },
|
{ provide: TranslateService, useValue: translate },
|
||||||
{ provide: NotificationsService, useValue: notificationsService },
|
{ provide: NotificationsService, useValue: notificationsService },
|
||||||
{
|
{ provide: NgbModal, useValue: mockNgbModal }
|
||||||
provide: NgbModal, useValue: {
|
|
||||||
open: () => {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
});
|
});
|
||||||
|
@@ -12,7 +12,7 @@ import { DSOSelectorComponent } from '../dso-selector/dso-selector.component';
|
|||||||
import { MockComponent } from 'ng-mocks';
|
import { MockComponent } from 'ng-mocks';
|
||||||
import { MetadataValue } from '../../../core/shared/metadata.models';
|
import { MetadataValue } from '../../../core/shared/metadata.models';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../remote-data.utils';
|
import { createSuccessfulRemoteDataObject } from '../../remote-data.utils';
|
||||||
import { NgIf } from "@angular/common";
|
import { NgIf } from '@angular/common';
|
||||||
|
|
||||||
describe('DSOSelectorModalWrapperComponent', () => {
|
describe('DSOSelectorModalWrapperComponent', () => {
|
||||||
let component: DSOSelectorModalWrapperComponent;
|
let component: DSOSelectorModalWrapperComponent;
|
||||||
|
@@ -13,8 +13,8 @@ import { AsyncPipe } from '@angular/common';
|
|||||||
import { ThemedLoadingComponent } from '../loading/themed-loading.component';
|
import { ThemedLoadingComponent } from '../loading/themed-loading.component';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
// eslint-disable-next-line @angular-eslint/pipe-prefix
|
|
||||||
@Pipe({
|
@Pipe({
|
||||||
|
// eslint-disable-next-line @angular-eslint/pipe-prefix
|
||||||
name: 'translate',
|
name: 'translate',
|
||||||
standalone: true
|
standalone: true
|
||||||
})
|
})
|
||||||
|
@@ -123,10 +123,10 @@ import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from './ds-dynamic-form-cons
|
|||||||
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
|
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
|
||||||
import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface';
|
import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface';
|
||||||
import { itemLinksToFollow } from '../../../utils/relation-query.utils';
|
import { itemLinksToFollow } from '../../../utils/relation-query.utils';
|
||||||
import { AsyncPipe, NgClass, NgForOf, NgIf, NgTemplateOutlet } from "@angular/common";
|
import { AsyncPipe, NgClass, NgForOf, NgIf, NgTemplateOutlet } from '@angular/common';
|
||||||
import {
|
import {
|
||||||
ExistingRelationListElementComponent
|
ExistingRelationListElementComponent
|
||||||
} from "./existing-relation-list-element/existing-relation-list-element.component";
|
} from './existing-relation-list-element/existing-relation-list-element.component';
|
||||||
|
|
||||||
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
|
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type<DynamicFormControl> | null {
|
||||||
switch (model.type) {
|
switch (model.type) {
|
||||||
|
@@ -5,7 +5,7 @@ import { DynamicNGBootstrapCheckboxComponent } from '@ng-dynamic-forms/ui-ng-boo
|
|||||||
import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core';
|
import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core';
|
||||||
|
|
||||||
import { DynamicCustomSwitchModel } from './custom-switch.model';
|
import { DynamicCustomSwitchModel } from './custom-switch.model';
|
||||||
import { NgClass } from "@angular/common";
|
import { NgClass } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-custom-switch',
|
selector: 'ds-custom-switch',
|
||||||
|
@@ -31,16 +31,16 @@ import { followLink } from '../../../../utils/follow-link-config.model';
|
|||||||
import { RelationshipType } from '../../../../../core/shared/item-relationships/relationship-type.model';
|
import { RelationshipType } from '../../../../../core/shared/item-relationships/relationship-type.model';
|
||||||
import {
|
import {
|
||||||
ThemedDynamicLookupRelationExternalSourceTabComponent
|
ThemedDynamicLookupRelationExternalSourceTabComponent
|
||||||
} from "./external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component";
|
} from './external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component';
|
||||||
import { TranslateModule } from "@ngx-translate/core";
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { ThemedLoadingComponent } from "../../../../loading/themed-loading.component";
|
import { ThemedLoadingComponent } from '../../../../loading/themed-loading.component';
|
||||||
import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
|
import { AsyncPipe, NgForOf, NgIf } from '@angular/common';
|
||||||
import {
|
import {
|
||||||
ThemedDynamicLookupRelationSearchTabComponent
|
ThemedDynamicLookupRelationSearchTabComponent
|
||||||
} from "./search-tab/themed-dynamic-lookup-relation-search-tab.component";
|
} from './search-tab/themed-dynamic-lookup-relation-search-tab.component';
|
||||||
import {
|
import {
|
||||||
DsDynamicLookupRelationSelectionTabComponent
|
DsDynamicLookupRelationSelectionTabComponent
|
||||||
} from "./selection-tab/dynamic-lookup-relation-selection-tab.component";
|
} from './selection-tab/dynamic-lookup-relation-selection-tab.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-dynamic-lookup-relation-modal',
|
selector: 'ds-dynamic-lookup-relation-modal',
|
||||||
|
@@ -25,8 +25,6 @@ import { ObjectCacheService } from '../../../../core/cache/object-cache.service'
|
|||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component';
|
|
||||||
import { ClaimedTaskActionsComponent } from '../../../../shared/mydspace-actions/claimed-task/claimed-task-actions.component';
|
|
||||||
|
|
||||||
let component: ClaimedTaskSearchResultDetailElementComponent;
|
let component: ClaimedTaskSearchResultDetailElementComponent;
|
||||||
let fixture: ComponentFixture<ClaimedTaskSearchResultDetailElementComponent>;
|
let fixture: ComponentFixture<ClaimedTaskSearchResultDetailElementComponent>;
|
||||||
|
@@ -10,8 +10,6 @@ import { ItemSearchResult } from '../../../object-collection/shared/item-search-
|
|||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component';
|
|
||||||
import { ItemActionsComponent } from '../../../../shared/mydspace-actions/item/item-actions.component';
|
|
||||||
|
|
||||||
let component: ItemSearchResultDetailElementComponent;
|
let component: ItemSearchResultDetailElementComponent;
|
||||||
let fixture: ComponentFixture<ItemSearchResultDetailElementComponent>;
|
let fixture: ComponentFixture<ItemSearchResultDetailElementComponent>;
|
||||||
|
@@ -18,8 +18,6 @@ import { ObjectCacheService } from '../../../../core/cache/object-cache.service'
|
|||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component';
|
|
||||||
import { PoolTaskActionsComponent } from '../../../../shared/mydspace-actions/pool-task/pool-task-actions.component';
|
|
||||||
|
|
||||||
let component: PoolSearchResultDetailElementComponent;
|
let component: PoolSearchResultDetailElementComponent;
|
||||||
let fixture: ComponentFixture<PoolSearchResultDetailElementComponent>;
|
let fixture: ComponentFixture<PoolSearchResultDetailElementComponent>;
|
||||||
|
@@ -14,8 +14,6 @@ import { LinkService } from '../../../../core/cache/builders/link.service';
|
|||||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component';
|
|
||||||
import { WorkflowitemActionsComponent } from '../../../../shared/mydspace-actions/workflowitem/workflowitem-actions.component';
|
|
||||||
|
|
||||||
let component: WorkflowItemSearchResultDetailElementComponent;
|
let component: WorkflowItemSearchResultDetailElementComponent;
|
||||||
let fixture: ComponentFixture<WorkflowItemSearchResultDetailElementComponent>;
|
let fixture: ComponentFixture<WorkflowItemSearchResultDetailElementComponent>;
|
||||||
|
@@ -14,8 +14,6 @@ import { LinkService } from '../../../../core/cache/builders/link.service';
|
|||||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component';
|
|
||||||
import { WorkspaceitemActionsComponent } from '../../../../shared/mydspace-actions/workspaceitem/workspaceitem-actions.component';
|
|
||||||
|
|
||||||
let component: WorkspaceItemSearchResultDetailElementComponent;
|
let component: WorkspaceItemSearchResultDetailElementComponent;
|
||||||
let fixture: ComponentFixture<WorkspaceItemSearchResultDetailElementComponent>;
|
let fixture: ComponentFixture<WorkspaceItemSearchResultDetailElementComponent>;
|
||||||
|
@@ -5,9 +5,8 @@ import { By } from '@angular/platform-browser';
|
|||||||
import { Community } from '../../../core/shared/community.model';
|
import { Community } from '../../../core/shared/community.model';
|
||||||
import { LinkService } from '../../../core/cache/builders/link.service';
|
import { LinkService } from '../../../core/cache/builders/link.service';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ActivatedRouteStub } from '../../testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../testing/active-router.stub';
|
||||||
import { ThemedThumbnailComponent } from '../../../thumbnail/themed-thumbnail.component';
|
|
||||||
|
|
||||||
let communityGridElementComponent: CommunityGridElementComponent;
|
let communityGridElementComponent: CommunityGridElementComponent;
|
||||||
let fixture: ComponentFixture<CommunityGridElementComponent>;
|
let fixture: ComponentFixture<CommunityGridElementComponent>;
|
||||||
|
@@ -12,9 +12,8 @@ import { buildPaginatedList } from '../../../../../core/data/paginated-list.mode
|
|||||||
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
||||||
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock } from '../../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../../mocks/dso-name.service.mock';
|
||||||
import {
|
|
||||||
ItemSearchResultGridElementComponent
|
|
||||||
} from '../../../search-result-grid-element/item-search-result/item/item-search-result-grid-element.component';
|
|
||||||
|
|
||||||
const mockItem = Object.assign(new Item(), {
|
const mockItem = Object.assign(new Item(), {
|
||||||
bundles: createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [])),
|
bundles: createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [])),
|
||||||
|
@@ -25,10 +25,6 @@ import { createSuccessfulRemoteDataObject$ } from '../../../../remote-data.utils
|
|||||||
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
||||||
import { TruncatePipe } from '../../../../utils/truncate.pipe';
|
import { TruncatePipe } from '../../../../utils/truncate.pipe';
|
||||||
import { ItemSearchResultGridElementComponent } from './item-search-result-grid-element.component';
|
import { ItemSearchResultGridElementComponent } from './item-search-result-grid-element.component';
|
||||||
import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbnail.component';
|
|
||||||
import { ThemedBadgesComponent } from '../../../../object-collection/shared/badges/themed-badges.component';
|
|
||||||
import { TruncatableComponent } from '../../../../truncatable/truncatable.component';
|
|
||||||
import { TruncatablePartComponent } from '../../../../truncatable/truncatable-part/truncatable-part.component';
|
|
||||||
import { ActivatedRouteStub } from '../../../../testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../../../testing/active-router.stub';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
|
@@ -36,7 +36,6 @@ import { NotificationsServiceStub } from '../../../testing/notifications-service
|
|||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { SearchServiceStub } from '../../../testing/search-service.stub';
|
import { SearchServiceStub } from '../../../testing/search-service.stub';
|
||||||
import { SearchService } from '../../../../core/shared/search/search.service';
|
import { SearchService } from '../../../../core/shared/search/search.service';
|
||||||
import { ClaimedTaskActionsComponent } from '../../../mydspace-actions/claimed-task/claimed-task-actions.component';
|
|
||||||
|
|
||||||
let component: ClaimedSearchResultListElementComponent;
|
let component: ClaimedSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<ClaimedSearchResultListElementComponent>;
|
let fixture: ComponentFixture<ClaimedSearchResultListElementComponent>;
|
||||||
|
@@ -17,8 +17,6 @@ import { Context } from '../../../../core/shared/context.model';
|
|||||||
import { ThemeService } from '../../../theme-support/theme.service';
|
import { ThemeService } from '../../../theme-support/theme.service';
|
||||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||||
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
||||||
import { ThemedItemListPreviewComponent } from '../item-list-preview/themed-item-list-preview.component';
|
|
||||||
import { ItemActionsComponent } from '../../../mydspace-actions/item/item-actions.component';
|
|
||||||
|
|
||||||
let component: ItemSearchResultListElementSubmissionComponent;
|
let component: ItemSearchResultListElementSubmissionComponent;
|
||||||
let fixture: ComponentFixture<ItemSearchResultListElementSubmissionComponent>;
|
let fixture: ComponentFixture<ItemSearchResultListElementSubmissionComponent>;
|
||||||
|
@@ -29,7 +29,6 @@ import { ObjectCacheService } from '../../../../core/cache/object-cache.service'
|
|||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { ThemeService } from '../../../theme-support/theme.service';
|
import { ThemeService } from '../../../theme-support/theme.service';
|
||||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||||
import { PoolTaskActionsComponent } from './../../../../shared/mydspace-actions/pool-task/pool-task-actions.component';
|
|
||||||
|
|
||||||
let component: PoolSearchResultListElementComponent;
|
let component: PoolSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<PoolSearchResultListElementComponent>;
|
let fixture: ComponentFixture<PoolSearchResultListElementComponent>;
|
||||||
|
@@ -20,11 +20,8 @@ import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
|||||||
import { APP_CONFIG } from '../../../../../config/app-config.interface';
|
import { APP_CONFIG } from '../../../../../config/app-config.interface';
|
||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
||||||
import {
|
|
||||||
ListableObjectComponentLoaderComponent
|
|
||||||
} from '../../../object-collection/shared/listable-object/listable-object-component-loader.component';
|
|
||||||
import { WorkflowitemActionsComponent } from '../../../mydspace-actions/workflowitem/workflowitem-actions.component';
|
|
||||||
import { ThemedLoadingComponent } from '../../../loading/themed-loading.component';
|
|
||||||
|
|
||||||
let component: WorkflowItemSearchResultListElementComponent;
|
let component: WorkflowItemSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<WorkflowItemSearchResultListElementComponent>;
|
let fixture: ComponentFixture<WorkflowItemSearchResultListElementComponent>;
|
||||||
|
@@ -22,11 +22,8 @@ import { Context } from '../../../../core/shared/context.model';
|
|||||||
import { ThemeService } from '../../../theme-support/theme.service';
|
import { ThemeService } from '../../../theme-support/theme.service';
|
||||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||||
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
||||||
import {
|
|
||||||
ListableObjectComponentLoaderComponent
|
|
||||||
} from '../../../object-collection/shared/listable-object/listable-object-component-loader.component';
|
|
||||||
import { WorkspaceitemActionsComponent } from '../../../mydspace-actions/workspaceitem/workspaceitem-actions.component';
|
|
||||||
import { ThemedLoadingComponent } from '../../../loading/themed-loading.component';
|
|
||||||
|
|
||||||
let component: WorkspaceItemSearchResultListElementComponent;
|
let component: WorkspaceItemSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<WorkspaceItemSearchResultListElementComponent>;
|
let fixture: ComponentFixture<WorkspaceItemSearchResultListElementComponent>;
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
import { defer } from 'rxjs';
|
|
||||||
import { StartsWithDateComponent } from './date/starts-with-date.component';
|
import { StartsWithDateComponent } from './date/starts-with-date.component';
|
||||||
import { StartsWithTextComponent } from './text/starts-with-text.component';
|
import { StartsWithTextComponent } from './text/starts-with-text.component';
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ import { UploaderOptions } from '../uploader/uploader-options.model';
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { FileValidator } from "../../utils/require-file.validator";
|
import { FileValidator } from '../../utils/require-file.validator';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component to have a file dropzone without that dropping/choosing a file in browse automatically triggers
|
* Component to have a file dropzone without that dropping/choosing a file in browse automatically triggers
|
||||||
|
@@ -14,8 +14,8 @@ import parseSectionErrors from '../../utils/parseSectionErrors';
|
|||||||
import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service';
|
import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service';
|
||||||
import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model';
|
import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model';
|
||||||
import { SectionsType } from '../../sections/sections-type';
|
import { SectionsType } from '../../sections/sections-type';
|
||||||
import { UploaderComponent } from "../../../shared/upload/uploader/uploader.component";
|
import { UploaderComponent } from '../../../shared/upload/uploader/uploader.component';
|
||||||
import { NgIf } from "@angular/common";
|
import { NgIf } from '@angular/common';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component represents the drop zone that provides to add files to the submission.
|
* This component represents the drop zone that provides to add files to the submission.
|
||||||
|
@@ -178,7 +178,9 @@ describe('SubmissionSectionFormComponent test suite', () => {
|
|||||||
{ provide: ThemeService, useValue: themeService },
|
{ provide: ThemeService, useValue: themeService },
|
||||||
{ provide: SubmissionService, useClass: SubmissionServiceStub },
|
{ provide: SubmissionService, useClass: SubmissionServiceStub },
|
||||||
{ provide: TranslateService, useValue: getMockTranslateService() },
|
{ provide: TranslateService, useValue: getMockTranslateService() },
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
{ provide: ObjectCacheService, useValue: { remove: () => { }, hasBySelfLinkObservable: () => observableOf(false), hasByHref$: () => observableOf(false) } },
|
{ provide: ObjectCacheService, useValue: { remove: () => { }, hasBySelfLinkObservable: () => observableOf(false), hasByHref$: () => observableOf(false) } },
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
{ provide: RequestService, useValue: { removeByHrefSubstring: () => { }, hasByHref$: () => observableOf(false) } },
|
{ provide: RequestService, useValue: { removeByHrefSubstring: () => { }, hasByHref$: () => observableOf(false) } },
|
||||||
{ provide: 'collectionIdProvider', useValue: collectionId },
|
{ provide: 'collectionIdProvider', useValue: collectionId },
|
||||||
{ provide: 'sectionDataProvider', useValue: Object.assign({}, sectionObject) },
|
{ provide: 'sectionDataProvider', useValue: Object.assign({}, sectionObject) },
|
||||||
|
@@ -16,8 +16,8 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
import { getMockThemeService } from '../shared/mocks/theme-service.mock';
|
import { getMockThemeService } from '../shared/mocks/theme-service.mock';
|
||||||
import { ThemeService } from '../shared/theme-support/theme.service';
|
import { ThemeService } from '../shared/theme-support/theme.service';
|
||||||
|
|
||||||
// eslint-disable-next-line @angular-eslint/pipe-prefix
|
|
||||||
@Pipe({
|
@Pipe({
|
||||||
|
// eslint-disable-next-line @angular-eslint/pipe-prefix
|
||||||
name: 'translate',
|
name: 'translate',
|
||||||
standalone: true
|
standalone: true
|
||||||
})
|
})
|
||||||
|
@@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { AdvancedWorkflowActionsLoaderComponent } from './advanced-workflow-actions-loader.component';
|
import { AdvancedWorkflowActionsLoaderComponent } from './advanced-workflow-actions-loader.component';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { RouterStub } from '../../../shared/testing/router.stub';
|
import { RouterStub } from '../../../shared/testing/router.stub';
|
||||||
import { ChangeDetectionStrategy, Component, ComponentFactoryResolver, Directive, Injector, NO_ERRORS_SCHEMA, NgModule, ViewContainerRef } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, ComponentFactoryResolver, Directive, Injector, NO_ERRORS_SCHEMA, ViewContainerRef } from '@angular/core';
|
||||||
import { AdvancedWorkflowActionsDirective } from './advanced-workflow-actions.directive';
|
import { AdvancedWorkflowActionsDirective } from './advanced-workflow-actions.directive';
|
||||||
import {
|
import {
|
||||||
rendersAdvancedWorkflowTaskOption
|
rendersAdvancedWorkflowTaskOption
|
||||||
|
@@ -14,7 +14,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|||||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||||
import {
|
import {
|
||||||
ModifyItemOverviewComponent
|
ModifyItemOverviewComponent
|
||||||
} from "../../item-page/edit-item-page/modify-item-overview/modify-item-overview.component";
|
} from '../../item-page/edit-item-page/modify-item-overview/modify-item-overview.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-workspaceitems-delete-page',
|
selector: 'ds-workspaceitems-delete-page',
|
||||||
|
Reference in New Issue
Block a user