mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53: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 { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
||||
import { FormsModule } from "@angular/forms";
|
||||
import { UiSwitchModule } from "ngx-ui-switch";
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { UiSwitchModule } from 'ngx-ui-switch';
|
||||
import {
|
||||
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({
|
||||
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 { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
||||
import { FormatFormComponent } from '../format-form/format-form.component';
|
||||
import { getMockFormBuilderService } from '../../../../shared/mocks/form-builder-service.mock';
|
||||
|
||||
describe('AddBitstreamFormatComponent', () => {
|
||||
let comp: AddBitstreamFormatComponent;
|
||||
@@ -37,15 +38,6 @@ describe('AddBitstreamFormatComponent', () => {
|
||||
let notificationService: NotificationsServiceStub;
|
||||
let bitstreamFormatDataService: BitstreamFormatDataService;
|
||||
|
||||
const formBuilderServiceStub = {
|
||||
createFormGroup: () => {
|
||||
return {
|
||||
patchValue: () => { },
|
||||
reset(_value?: any, _options?: { onlySelf?: boolean; emitEvent?: boolean; }): void { },
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
const initAsync = () => {
|
||||
router = new RouterStub();
|
||||
notificationService = new NotificationsServiceStub();
|
||||
@@ -61,7 +53,7 @@ describe('AddBitstreamFormatComponent', () => {
|
||||
{ provide: NotificationsService, useValue: notificationService },
|
||||
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
|
||||
{ provide: FormService, useValue: getMockFormService() },
|
||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub },
|
||||
{ provide: FormBuilderService, useValue: getMockFormBuilderService() },
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
})
|
||||
@@ -108,7 +100,7 @@ describe('AddBitstreamFormatComponent', () => {
|
||||
{ provide: NotificationsService, useValue: notificationService },
|
||||
{ provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService },
|
||||
{ provide: FormService, useValue: getMockFormService() },
|
||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub },
|
||||
{ provide: FormBuilderService, useValue: getMockFormBuilderService() },
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
})
|
||||
|
@@ -8,7 +8,7 @@ import { I18nBreadcrumbResolver } from '../../../core/breadcrumbs/i18n-breadcrum
|
||||
const BITSTREAMFORMAT_EDIT_PATH = ':id/edit';
|
||||
const BITSTREAMFORMAT_ADD_PATH = 'add';
|
||||
|
||||
const providers = [BitstreamFormatsResolver]
|
||||
const providers = [BitstreamFormatsResolver];
|
||||
|
||||
export const ROUTES: Route[] = [
|
||||
{
|
||||
|
@@ -13,8 +13,8 @@ import { NoContent } from '../../../core/shared/NoContent.model';
|
||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||
import { FindListOptions } from '../../../core/data/find-list-options.model';
|
||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||
import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
|
||||
import { PaginationComponent } from "../../../shared/pagination/pagination.component";
|
||||
import { AsyncPipe, NgForOf, NgIf } from '@angular/common';
|
||||
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||
|
||||
/**
|
||||
* 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 { MetadataSchemaFormComponent } from './metadata-schema-form/metadata-schema-form.component';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { getMockFormBuilderService } from '../../../shared/mocks/form-builder-service.mock';
|
||||
|
||||
describe('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',
|
||||
{
|
||||
// findByHref: jasmine.createSpy('findByHref'),
|
||||
@@ -136,7 +128,7 @@ describe('MetadataRegistryComponent', () => {
|
||||
provide: SearchConfigurationService,
|
||||
useValue: new SearchConfigurationServiceStub(),
|
||||
},
|
||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub },
|
||||
{ provide: FormBuilderService, useValue: getMockFormBuilderService() },
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
})
|
||||
|
@@ -11,6 +11,7 @@ import { FormBuilderService } from '../../../../shared/form/builder/form-builder
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||
import { FormComponent } from '../../../../shared/form/form.component';
|
||||
import { getMockFormBuilderService } from '../../../../shared/mocks/form-builder-service.mock';
|
||||
|
||||
describe('MetadataSchemaFormComponent', () => {
|
||||
let component: MetadataSchemaFormComponent;
|
||||
@@ -25,16 +26,6 @@ describe('MetadataSchemaFormComponent', () => {
|
||||
},
|
||||
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 */
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
@@ -42,7 +33,7 @@ describe('MetadataSchemaFormComponent', () => {
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataSchemaFormComponent, EnumKeysPipe],
|
||||
providers: [
|
||||
{ provide: RegistryService, useValue: registryServiceStub },
|
||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub }
|
||||
{ provide: FormBuilderService, useValue: getMockFormBuilderService() }
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
|
@@ -13,6 +13,7 @@ import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { MetadataField } from '../../../../core/metadata/metadata-field.model';
|
||||
import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model';
|
||||
import { FormComponent } from '../../../../shared/form/form.component';
|
||||
import { getMockFormBuilderService } from '../../../../shared/mocks/form-builder-service.mock';
|
||||
|
||||
describe('MetadataFieldFormComponent', () => {
|
||||
let component: MetadataFieldFormComponent;
|
||||
@@ -36,16 +37,6 @@ describe('MetadataFieldFormComponent', () => {
|
||||
},
|
||||
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 */
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
@@ -53,7 +44,7 @@ describe('MetadataFieldFormComponent', () => {
|
||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataFieldFormComponent, EnumKeysPipe],
|
||||
providers: [
|
||||
{ provide: RegistryService, useValue: registryServiceStub },
|
||||
{ provide: FormBuilderService, useValue: formBuilderServiceStub }
|
||||
{ provide: FormBuilderService, useValue: getMockFormBuilderService() }
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
})
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { RegistryService } from '../../../core/registry/registry.service';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
import {
|
||||
BehaviorSubject,
|
||||
combineLatest as observableCombineLatest,
|
||||
|
@@ -12,7 +12,7 @@ import { AuthServiceStub } from '../../shared/testing/auth-service.stub';
|
||||
import { AuthService } from '../../core/auth/auth.service';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
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 { ActivatedRoute } from '@angular/router';
|
||||
import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service';
|
||||
@@ -50,6 +50,12 @@ describe('AdminSidebarComponent', () => {
|
||||
children: []
|
||||
};
|
||||
|
||||
const mockNgbModal = {
|
||||
open: jasmine.createSpy('open').and.returnValue(
|
||||
{ componentInstance: {}, closed: observableOf({})} as NgbModalRef
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
authorizationService = jasmine.createSpyObj('authorizationService', {
|
||||
@@ -68,12 +74,7 @@ describe('AdminSidebarComponent', () => {
|
||||
{ provide: AuthorizationDataService, useValue: authorizationService },
|
||||
{ provide: ScriptDataService, useValue: scriptService },
|
||||
{ provide: ActivatedRoute, useValue: routeStub },
|
||||
{
|
||||
provide: NgbModal, useValue: {
|
||||
open: () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
{ provide: NgbModal, useValue: mockNgbModal }
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
}).overrideComponent(AdminSidebarComponent, {
|
||||
|
@@ -29,7 +29,6 @@ import { getMockLinkService } from '../../../../../shared/mocks/link-service.moc
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
||||
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 { AuthServiceMock } from '../../../../../shared/mocks/auth.service.mock';
|
||||
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 { FieldUpdate } from '../../../core/data/object-updates/field-update.model';
|
||||
import { FieldUpdates } from '../../../core/data/object-updates/field-updates.model';
|
||||
import { ThemedLoadingComponent } from "../../../shared/loading/themed-loading.component";
|
||||
import { FormComponent } from "../../../shared/form/form.component";
|
||||
import { CollectionSourceControlsComponent } from "./collection-source-controls/collection-source-controls.component";
|
||||
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
|
||||
import { FormComponent } from '../../../shared/form/form.component';
|
||||
import { CollectionSourceControlsComponent } from './collection-source-controls/collection-source-controls.component';
|
||||
|
||||
/**
|
||||
* Component for managing the content source of the collection
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Route, RouterModule } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Route } from '@angular/router';
|
||||
import { CollectionItemMapperComponent } from '../collection-item-mapper/collection-item-mapper.component';
|
||||
import { EditCollectionPageComponent } from './edit-collection-page.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 { hasValue } from '../../shared/empty.util';
|
||||
import { ObjectCollectionComponent } from '../../shared/object-collection/object-collection.component';
|
||||
import { ErrorComponent } from "../../shared/error/error.component";
|
||||
import { ThemedLoadingComponent } from "../../shared/loading/themed-loading.component";
|
||||
import { AsyncPipe, NgIf } from "@angular/common";
|
||||
import { TranslateModule } from "@ngx-translate/core";
|
||||
import { VarDirective } from "../../shared/utils/var.directive";
|
||||
import { ErrorComponent } from '../../shared/error/error.component';
|
||||
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
|
||||
import { AsyncPipe, NgIf } from '@angular/common';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { VarDirective } from '../../shared/utils/var.directive';
|
||||
|
||||
@Component({
|
||||
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 { ObjectCacheService } from '../cache/object-cache.service';
|
||||
import { Bundle } from '../shared/bundle.model';
|
||||
import { BUNDLE } from '../shared/bundle.resource-type';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { Item } from '../shared/item.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 { RestRequestMethod } from './rest-request-method';
|
||||
import { Operation } from 'fast-json-patch';
|
||||
import { dataService } from './base/data-service.decorator';
|
||||
|
||||
/**
|
||||
* 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 { MOCK_RESPONSE_MAP, ResponseMapMock } from '../shared/mocks/dspace-rest/mocks/response-map.mock';
|
||||
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 { NonHierarchicalBrowseDefinition } from './shared/non-hierarchical-browse-definition';
|
||||
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 = () => {
|
||||
|
@@ -12,9 +12,8 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
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(), {
|
||||
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 { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
||||
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 { ActivatedRouteStub } from '../../../../../shared/testing/active-router.stub';
|
||||
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 { BrowseDefinitionDataService } from '../../../../core/browse/browse-definition-data.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 {
|
||||
MetadataValuesComponent
|
||||
|
@@ -12,7 +12,6 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
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(), {
|
||||
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 { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
||||
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 { 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 { environment } from '../../../../../../environments/environment';
|
||||
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
||||
import { OrgUnitInputSuggestionsComponent } from './org-unit-suggestions/org-unit-input-suggestions.component';
|
||||
|
||||
let personListElementComponent: OrgUnitSearchResultListSubmissionElementComponent;
|
||||
let fixture: ComponentFixture<OrgUnitSearchResultListSubmissionElementComponent>;
|
||||
|
@@ -26,7 +26,6 @@ import { TruncatableService } from '../../../../../shared/truncatable/truncatabl
|
||||
import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe';
|
||||
import { PersonSearchResultListSubmissionElementComponent } from './person-search-result-list-submission-element.component';
|
||||
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 { AuthService } from '../../../../../core/auth/auth.service';
|
||||
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 { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
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 { Item } from '../../../../core/shared/item.model';
|
||||
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 { createPaginatedList } from '../../../../shared/testing/utils.test';
|
||||
import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model';
|
||||
@@ -30,6 +31,7 @@ let fieldUpdate1;
|
||||
let fieldUpdate2;
|
||||
let relationships;
|
||||
let relationshipType;
|
||||
let mockNgbModal;
|
||||
|
||||
let fixture: ComponentFixture<EditRelationshipComponent>;
|
||||
let comp: EditRelationshipComponent;
|
||||
@@ -121,18 +123,19 @@ describe('EditRelationshipComponent', () => {
|
||||
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]));
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), EditRelationshipComponent],
|
||||
providers: [
|
||||
{ provide: ObjectUpdatesService, useValue: objectUpdatesService },
|
||||
{
|
||||
provide: NgbModal, useValue: {
|
||||
open: () => {
|
||||
}
|
||||
},
|
||||
},
|
||||
{ provide: NgbModal, useValue: mockNgbModal },
|
||||
{ provide: ThemeService, useValue: getMockThemeService() }
|
||||
], schemas: [
|
||||
NO_ERRORS_SCHEMA
|
||||
|
@@ -10,8 +10,8 @@ import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { ResearcherProfile } from '../../../core/profile/model/researcher-profile.model';
|
||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||
import { OrcidAuthService } from '../../../core/orcid/orcid-auth.service';
|
||||
import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
|
||||
import { AlertComponent } from "../../../shared/alert/alert.component";
|
||||
import { AsyncPipe, NgForOf, NgIf } from '@angular/common';
|
||||
import { AlertComponent } from '../../../shared/alert/alert.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-orcid-auth',
|
||||
|
@@ -11,14 +11,14 @@ import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { MenuService } from './shared/menu/menu.service';
|
||||
import { AuthorizationDataService } from './core/data/feature-authorization/authorization-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 { MenuID } from './shared/menu/menu-id.model';
|
||||
import { BrowseService } from './core/browse/browse.service';
|
||||
import { cold } from 'jasmine-marbles';
|
||||
import createSpy = jasmine.createSpy;
|
||||
import { createSuccessfulRemoteDataObject$ } from './shared/remote-data.utils';
|
||||
import { createPaginatedList } from './shared/testing/utils.test';
|
||||
import createSpy = jasmine.createSpy;
|
||||
|
||||
const BOOLEAN = { t: true, f: false };
|
||||
const MENU_STATE = {
|
||||
@@ -37,6 +37,7 @@ describe('MenuResolver', () => {
|
||||
let browseService;
|
||||
let authorizationService;
|
||||
let scriptService;
|
||||
let mockNgbModal;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
menuService = new MenuServiceStub();
|
||||
@@ -52,6 +53,11 @@ describe('MenuResolver', () => {
|
||||
scriptService = jasmine.createSpyObj('scriptService', {
|
||||
scriptWithNameExistsAndCanExecute: observableOf(true)
|
||||
});
|
||||
mockNgbModal = {
|
||||
open: jasmine.createSpy('open').and.returnValue(
|
||||
{ componentInstance: {}, closed: observableOf({})} as NgbModalRef
|
||||
)
|
||||
};
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent],
|
||||
@@ -60,12 +66,7 @@ describe('MenuResolver', () => {
|
||||
{ provide: BrowseService, useValue: browseService },
|
||||
{ provide: AuthorizationDataService, useValue: authorizationService },
|
||||
{ provide: ScriptDataService, useValue: scriptService },
|
||||
{
|
||||
provide: NgbModal, useValue: {
|
||||
open: () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
{ provide: NgbModal, useValue: mockNgbModal }
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
});
|
||||
|
@@ -7,7 +7,7 @@ import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AdminSidebarComponent } from '../../admin/admin-sidebar/admin-sidebar.component';
|
||||
import { MenuService } from '../menu/menu.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 { DSOEditMenuResolver } from './dso-edit-menu.resolver';
|
||||
import { DsoVersioningModalService } from './dso-versioning-modal-service/dso-versioning-modal.service';
|
||||
@@ -39,6 +39,7 @@ describe('DSOEditMenuResolver', () => {
|
||||
let researcherProfileService;
|
||||
let notificationsService;
|
||||
let translate;
|
||||
let mockNgbModal;
|
||||
|
||||
const dsoRoute = (dso: DSpaceObject) => {
|
||||
return {
|
||||
@@ -140,6 +141,11 @@ describe('DSOEditMenuResolver', () => {
|
||||
success: {},
|
||||
error: {},
|
||||
});
|
||||
mockNgbModal = {
|
||||
open: jasmine.createSpy('open').and.returnValue(
|
||||
{ componentInstance: {}, closed: observableOf({})} as NgbModalRef
|
||||
)
|
||||
};
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent],
|
||||
@@ -151,12 +157,7 @@ describe('DSOEditMenuResolver', () => {
|
||||
{ provide: ResearcherProfileDataService, useValue: researcherProfileService },
|
||||
{ provide: TranslateService, useValue: translate },
|
||||
{ provide: NotificationsService, useValue: notificationsService },
|
||||
{
|
||||
provide: NgbModal, useValue: {
|
||||
open: () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
{ provide: NgbModal, useValue: mockNgbModal }
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
});
|
||||
|
@@ -12,7 +12,7 @@ import { DSOSelectorComponent } from '../dso-selector/dso-selector.component';
|
||||
import { MockComponent } from 'ng-mocks';
|
||||
import { MetadataValue } from '../../../core/shared/metadata.models';
|
||||
import { createSuccessfulRemoteDataObject } from '../../remote-data.utils';
|
||||
import { NgIf } from "@angular/common";
|
||||
import { NgIf } from '@angular/common';
|
||||
|
||||
describe('DSOSelectorModalWrapperComponent', () => {
|
||||
let component: DSOSelectorModalWrapperComponent;
|
||||
|
@@ -13,8 +13,8 @@ import { AsyncPipe } from '@angular/common';
|
||||
import { ThemedLoadingComponent } from '../loading/themed-loading.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
// eslint-disable-next-line @angular-eslint/pipe-prefix
|
||||
@Pipe({
|
||||
// eslint-disable-next-line @angular-eslint/pipe-prefix
|
||||
name: 'translate',
|
||||
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 { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface';
|
||||
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 {
|
||||
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 {
|
||||
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 { DynamicCustomSwitchModel } from './custom-switch.model';
|
||||
import { NgClass } from "@angular/common";
|
||||
import { NgClass } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
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 {
|
||||
ThemedDynamicLookupRelationExternalSourceTabComponent
|
||||
} from "./external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component";
|
||||
import { TranslateModule } from "@ngx-translate/core";
|
||||
import { ThemedLoadingComponent } from "../../../../loading/themed-loading.component";
|
||||
import { AsyncPipe, NgForOf, NgIf } from "@angular/common";
|
||||
} from './external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ThemedLoadingComponent } from '../../../../loading/themed-loading.component';
|
||||
import { AsyncPipe, NgForOf, NgIf } from '@angular/common';
|
||||
import {
|
||||
ThemedDynamicLookupRelationSearchTabComponent
|
||||
} from "./search-tab/themed-dynamic-lookup-relation-search-tab.component";
|
||||
} from './search-tab/themed-dynamic-lookup-relation-search-tab.component';
|
||||
import {
|
||||
DsDynamicLookupRelationSelectionTabComponent
|
||||
} from "./selection-tab/dynamic-lookup-relation-selection-tab.component";
|
||||
} from './selection-tab/dynamic-lookup-relation-selection-tab.component';
|
||||
|
||||
@Component({
|
||||
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 { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
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 fixture: ComponentFixture<ClaimedTaskSearchResultDetailElementComponent>;
|
||||
|
@@ -10,8 +10,6 @@ import { ItemSearchResult } from '../../../object-collection/shared/item-search-
|
||||
import { Context } from '../../../../core/shared/context.model';
|
||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
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 fixture: ComponentFixture<ItemSearchResultDetailElementComponent>;
|
||||
|
@@ -18,8 +18,6 @@ import { ObjectCacheService } from '../../../../core/cache/object-cache.service'
|
||||
import { Context } from '../../../../core/shared/context.model';
|
||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
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 fixture: ComponentFixture<PoolSearchResultDetailElementComponent>;
|
||||
|
@@ -14,8 +14,6 @@ import { LinkService } from '../../../../core/cache/builders/link.service';
|
||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||
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 fixture: ComponentFixture<WorkflowItemSearchResultDetailElementComponent>;
|
||||
|
@@ -14,8 +14,6 @@ import { LinkService } from '../../../../core/cache/builders/link.service';
|
||||
import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service';
|
||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||
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 fixture: ComponentFixture<WorkspaceItemSearchResultDetailElementComponent>;
|
||||
|
@@ -5,9 +5,8 @@ import { By } from '@angular/platform-browser';
|
||||
import { Community } from '../../../core/shared/community.model';
|
||||
import { LinkService } from '../../../core/cache/builders/link.service';
|
||||
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 { ThemedThumbnailComponent } from '../../../thumbnail/themed-thumbnail.component';
|
||||
|
||||
let communityGridElementComponent: 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 { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
||||
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(), {
|
||||
bundles: createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), [])),
|
||||
|
@@ -25,10 +25,6 @@ import { createSuccessfulRemoteDataObject$ } from '../../../../remote-data.utils
|
||||
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
||||
import { TruncatePipe } from '../../../../utils/truncate.pipe';
|
||||
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 { ActivatedRoute } from '@angular/router';
|
||||
|
||||
|
@@ -36,7 +36,6 @@ import { NotificationsServiceStub } from '../../../testing/notifications-service
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { SearchServiceStub } from '../../../testing/search-service.stub';
|
||||
import { SearchService } from '../../../../core/shared/search/search.service';
|
||||
import { ClaimedTaskActionsComponent } from '../../../mydspace-actions/claimed-task/claimed-task-actions.component';
|
||||
|
||||
let component: ClaimedSearchResultListElementComponent;
|
||||
let fixture: ComponentFixture<ClaimedSearchResultListElementComponent>;
|
||||
|
@@ -17,8 +17,6 @@ import { Context } from '../../../../core/shared/context.model';
|
||||
import { ThemeService } from '../../../theme-support/theme.service';
|
||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||
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 fixture: ComponentFixture<ItemSearchResultListElementSubmissionComponent>;
|
||||
|
@@ -29,7 +29,6 @@ import { ObjectCacheService } from '../../../../core/cache/object-cache.service'
|
||||
import { Context } from '../../../../core/shared/context.model';
|
||||
import { ThemeService } from '../../../theme-support/theme.service';
|
||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||
import { PoolTaskActionsComponent } from './../../../../shared/mydspace-actions/pool-task/pool-task-actions.component';
|
||||
|
||||
let component: 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 { Context } from '../../../../core/shared/context.model';
|
||||
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 fixture: ComponentFixture<WorkflowItemSearchResultListElementComponent>;
|
||||
|
@@ -22,11 +22,8 @@ import { Context } from '../../../../core/shared/context.model';
|
||||
import { ThemeService } from '../../../theme-support/theme.service';
|
||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||
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 fixture: ComponentFixture<WorkspaceItemSearchResultListElementComponent>;
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import { defer } from 'rxjs';
|
||||
import { StartsWithDateComponent } from './date/starts-with-date.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 { FormsModule } from '@angular/forms';
|
||||
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
|
||||
|
@@ -14,8 +14,8 @@ import parseSectionErrors from '../../utils/parseSectionErrors';
|
||||
import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service';
|
||||
import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model';
|
||||
import { SectionsType } from '../../sections/sections-type';
|
||||
import { UploaderComponent } from "../../../shared/upload/uploader/uploader.component";
|
||||
import { NgIf } from "@angular/common";
|
||||
import { UploaderComponent } from '../../../shared/upload/uploader/uploader.component';
|
||||
import { NgIf } from '@angular/common';
|
||||
|
||||
/**
|
||||
* 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: SubmissionService, useClass: SubmissionServiceStub },
|
||||
{ provide: TranslateService, useValue: getMockTranslateService() },
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
{ 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: 'collectionIdProvider', useValue: collectionId },
|
||||
{ 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 { ThemeService } from '../shared/theme-support/theme.service';
|
||||
|
||||
// eslint-disable-next-line @angular-eslint/pipe-prefix
|
||||
@Pipe({
|
||||
// eslint-disable-next-line @angular-eslint/pipe-prefix
|
||||
name: 'translate',
|
||||
standalone: true
|
||||
})
|
||||
|
@@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AdvancedWorkflowActionsLoaderComponent } from './advanced-workflow-actions-loader.component';
|
||||
import { Router } from '@angular/router';
|
||||
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 {
|
||||
rendersAdvancedWorkflowTaskOption
|
||||
|
@@ -14,7 +14,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||
import {
|
||||
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({
|
||||
selector: 'ds-workspaceitems-delete-page',
|
||||
|
Reference in New Issue
Block a user