mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge remote-tracking branch '4scienceGithub/DURACOM-191' into DURACOM-191
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
|||||||
TestBed,
|
TestBed,
|
||||||
tick,
|
tick,
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import {
|
import {
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
@@ -22,6 +23,7 @@ import { PaginationService } from '../../../core/pagination/pagination.service';
|
|||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
import { PaginationComponent } from '../../../shared/pagination/pagination.component';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils';
|
||||||
|
import { ActivatedRouteStub } from '../../../shared/testing/active-router.stub';
|
||||||
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
|
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
|
||||||
import { PaginationServiceStub } from '../../../shared/testing/pagination-service.stub';
|
import { PaginationServiceStub } from '../../../shared/testing/pagination-service.stub';
|
||||||
import { createPaginatedList } from '../../../shared/testing/utils.test';
|
import { createPaginatedList } from '../../../shared/testing/utils.test';
|
||||||
@@ -30,8 +32,6 @@ import { TruncatablePartComponent } from '../../../shared/truncatable/truncatabl
|
|||||||
import { LdnServicesService } from '../ldn-services-data/ldn-services-data.service';
|
import { LdnServicesService } from '../ldn-services-data/ldn-services-data.service';
|
||||||
import { LdnService } from '../ldn-services-model/ldn-services.model';
|
import { LdnService } from '../ldn-services-model/ldn-services.model';
|
||||||
import { LdnServicesOverviewComponent } from './ldn-services-directory.component';
|
import { LdnServicesOverviewComponent } from './ldn-services-directory.component';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
|
||||||
import { ActivatedRouteStub } from '../../../shared/testing/active-router.stub';
|
|
||||||
|
|
||||||
describe('LdnServicesOverviewComponent', () => {
|
describe('LdnServicesOverviewComponent', () => {
|
||||||
let component: LdnServicesOverviewComponent;
|
let component: LdnServicesOverviewComponent;
|
||||||
|
@@ -9,17 +9,18 @@ import {
|
|||||||
import { provideMockStore } from '@ngrx/store/testing';
|
import { provideMockStore } from '@ngrx/store/testing';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
import { APP_DATA_SERVICES_MAP } from '../../../../../config/app-config.interface';
|
||||||
import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-data-build.service';
|
||||||
import { ObjectCacheService } from '../../../../core/cache/object-cache.service';
|
import { ObjectCacheService } from '../../../../core/cache/object-cache.service';
|
||||||
import { RequestService } from '../../../../core/data/request.service';
|
import { RequestService } from '../../../../core/data/request.service';
|
||||||
import { RouteService } from '../../../../core/services/route.service';
|
import { RouteService } from '../../../../core/services/route.service';
|
||||||
import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service';
|
import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service';
|
||||||
import { MockActivatedRoute } from '../../../../shared/mocks/active-router.mock';
|
import { MockActivatedRoute } from '../../../../shared/mocks/active-router.mock';
|
||||||
|
import { SearchLabelsComponent } from '../../../../shared/search/search-labels/search-labels.component';
|
||||||
|
import { ThemedSearchComponent } from '../../../../shared/search/themed-search.component';
|
||||||
import { routeServiceStub } from '../../../../shared/testing/route-service.stub';
|
import { routeServiceStub } from '../../../../shared/testing/route-service.stub';
|
||||||
import { RouterStub } from '../../../../shared/testing/router.stub';
|
import { RouterStub } from '../../../../shared/testing/router.stub';
|
||||||
import { AdminNotifyLogsResultComponent } from './admin-notify-logs-result.component';
|
import { AdminNotifyLogsResultComponent } from './admin-notify-logs-result.component';
|
||||||
import { SearchLabelsComponent } from '../../../../shared/search/search-labels/search-labels.component';
|
|
||||||
import { ThemedSearchComponent } from '../../../../shared/search/themed-search.component';
|
|
||||||
|
|
||||||
describe('AdminNotifyLogsResultComponent', () => {
|
describe('AdminNotifyLogsResultComponent', () => {
|
||||||
let component: AdminNotifyLogsResultComponent;
|
let component: AdminNotifyLogsResultComponent;
|
||||||
@@ -39,6 +40,7 @@ describe('AdminNotifyLogsResultComponent', () => {
|
|||||||
{ provide: HALEndpointService, useValue: halService },
|
{ provide: HALEndpointService, useValue: halService },
|
||||||
{ provide: ObjectCacheService, useValue: objectCache },
|
{ provide: ObjectCacheService, useValue: objectCache },
|
||||||
{ provide: RequestService, useValue: requestService },
|
{ provide: RequestService, useValue: requestService },
|
||||||
|
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
||||||
{ provide: RemoteDataBuildService, useValue: rdbService },
|
{ provide: RemoteDataBuildService, useValue: rdbService },
|
||||||
provideMockStore({}),
|
provideMockStore({}),
|
||||||
],
|
],
|
||||||
|
@@ -6,6 +6,7 @@ import { ActivatedRoute } from '@angular/router';
|
|||||||
import { provideMockStore } from '@ngrx/store/testing';
|
import { provideMockStore } from '@ngrx/store/testing';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
import { APP_DATA_SERVICES_MAP } from '../../../../../config/app-config.interface';
|
||||||
import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-data-build.service';
|
||||||
import { RequestService } from '../../../../core/data/request.service';
|
import { RequestService } from '../../../../core/data/request.service';
|
||||||
import { RouteService } from '../../../../core/services/route.service';
|
import { RouteService } from '../../../../core/services/route.service';
|
||||||
@@ -39,6 +40,7 @@ describe('AdminNotifyOutgoingComponent', () => {
|
|||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: SEARCH_CONFIG_SERVICE, useValue: SearchConfigurationService },
|
{ provide: SEARCH_CONFIG_SERVICE, useValue: SearchConfigurationService },
|
||||||
|
{ provide: APP_DATA_SERVICES_MAP, useValue: {} },
|
||||||
{ provide: RouteService, useValue: routeServiceStub },
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
{ provide: ActivatedRoute, useValue: new MockActivatedRoute() },
|
{ provide: ActivatedRoute, useValue: new MockActivatedRoute() },
|
||||||
{ provide: HALEndpointService, useValue: halService },
|
{ provide: HALEndpointService, useValue: halService },
|
||||||
|
@@ -18,6 +18,7 @@ import { DSONameServiceMock } from '../../../../../shared/mocks/dso-name.service
|
|||||||
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
||||||
import { CollectionElementLinkType } from '../../../../../shared/object-collection/collection-element-link.type';
|
import { CollectionElementLinkType } from '../../../../../shared/object-collection/collection-element-link.type';
|
||||||
import { CommunitySearchResult } from '../../../../../shared/object-collection/shared/community-search-result.model';
|
import { CommunitySearchResult } from '../../../../../shared/object-collection/shared/community-search-result.model';
|
||||||
|
import { CommunitySearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component';
|
||||||
import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service';
|
import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service';
|
||||||
import { CommunityAdminSearchResultListElementComponent } from './community-admin-search-result-list-element.component';
|
import { CommunityAdminSearchResultListElementComponent } from './community-admin-search-result-list-element.component';
|
||||||
|
|
||||||
@@ -49,6 +50,11 @@ describe('CommunityAdminSearchResultListElementComponent', () => {
|
|||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
})
|
})
|
||||||
|
.overrideComponent(CommunityAdminSearchResultListElementComponent, {
|
||||||
|
remove: {
|
||||||
|
imports: [CommunitySearchResultListElementComponent],
|
||||||
|
},
|
||||||
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -2,9 +2,11 @@ import {
|
|||||||
ComponentFixture,
|
ComponentFixture,
|
||||||
TestBed,
|
TestBed,
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
|
import { ActivatedRouteStub } from '../../../shared/testing/active-router.stub';
|
||||||
import { NotifyInfoComponent } from './notify-info.component';
|
import { NotifyInfoComponent } from './notify-info.component';
|
||||||
import { NotifyInfoService } from './notify-info.service';
|
import { NotifyInfoService } from './notify-info.service';
|
||||||
|
|
||||||
@@ -20,6 +22,7 @@ describe('NotifyInfoComponent', () => {
|
|||||||
imports: [TranslateModule.forRoot(), NotifyInfoComponent],
|
imports: [TranslateModule.forRoot(), NotifyInfoComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: NotifyInfoService, useValue: notifyInfoServiceSpy },
|
{ provide: NotifyInfoService, useValue: notifyInfoServiceSpy },
|
||||||
|
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub() },
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import { NgClass } from '@angular/common';
|
||||||
import {
|
import {
|
||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
NO_ERRORS_SCHEMA,
|
NO_ERRORS_SCHEMA,
|
||||||
@@ -100,6 +101,11 @@ describe('JournalVolumeSearchResultListElementComponent', () => {
|
|||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
}).overrideComponent(JournalVolumeSearchResultListElementComponent, {
|
}).overrideComponent(JournalVolumeSearchResultListElementComponent, {
|
||||||
add: { changeDetection: ChangeDetectionStrategy.Default },
|
add: { changeDetection: ChangeDetectionStrategy.Default },
|
||||||
|
remove: {
|
||||||
|
imports: [
|
||||||
|
ThumbnailComponent, NgClass, ThemedBadgesComponent, TruncatableComponent, TruncatablePartComponent,
|
||||||
|
],
|
||||||
|
},
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -17,16 +17,15 @@ import { Item } from '../../../../../core/shared/item.model';
|
|||||||
import { DSONameServiceMock } from '../../../../../shared/mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../../../shared/mocks/dso-name.service.mock';
|
||||||
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../../../shared/mocks/mock-trucatable.service';
|
||||||
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
||||||
|
import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component';
|
||||||
import { ItemSearchResult } from '../../../../../shared/object-collection/shared/item-search-result.model';
|
import { ItemSearchResult } from '../../../../../shared/object-collection/shared/item-search-result.model';
|
||||||
import { ActivatedRouteStub } from '../../../../../shared/testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../../../../shared/testing/active-router.stub';
|
||||||
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
||||||
|
import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component';
|
||||||
import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service';
|
import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service';
|
||||||
import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe';
|
import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe';
|
||||||
import { ProjectSearchResultListElementComponent } from './project-search-result-list-element.component';
|
|
||||||
import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component';
|
import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component';
|
||||||
import { NgClass } from '@angular/common';
|
import { ProjectSearchResultListElementComponent } from './project-search-result-list-element.component';
|
||||||
import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component';
|
|
||||||
import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component';
|
|
||||||
|
|
||||||
let projectListElementComponent: ProjectSearchResultListElementComponent;
|
let projectListElementComponent: ProjectSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<ProjectSearchResultListElementComponent>;
|
let fixture: ComponentFixture<ProjectSearchResultListElementComponent>;
|
||||||
|
@@ -15,6 +15,7 @@ import {
|
|||||||
makeStateKey,
|
makeStateKey,
|
||||||
TransferState,
|
TransferState,
|
||||||
} from '@angular/platform-browser';
|
} from '@angular/platform-browser';
|
||||||
|
import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core';
|
||||||
import {
|
import {
|
||||||
select,
|
select,
|
||||||
Store,
|
Store,
|
||||||
@@ -45,7 +46,6 @@ import { dsDynamicFormControlMapFn } from './shared/form/builder/ds-dynamic-form
|
|||||||
import { MenuService } from './shared/menu/menu.service';
|
import { MenuService } from './shared/menu/menu.service';
|
||||||
import { ThemeService } from './shared/theme-support/theme.service';
|
import { ThemeService } from './shared/theme-support/theme.service';
|
||||||
import { Angulartics2DSpace } from './statistics/angulartics/dspace-provider';
|
import { Angulartics2DSpace } from './statistics/angulartics/dspace-provider';
|
||||||
import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs the initialization of the app.
|
* Performs the initialization of the app.
|
||||||
|
@@ -28,6 +28,7 @@ import { AuthorizationDataService } from '../core/data/feature-authorization/aut
|
|||||||
import { EPersonDataService } from '../core/eperson/eperson-data.service';
|
import { EPersonDataService } from '../core/eperson/eperson-data.service';
|
||||||
import { EPerson } from '../core/eperson/models/eperson.model';
|
import { EPerson } from '../core/eperson/models/eperson.model';
|
||||||
import { ConfigurationProperty } from '../core/shared/configuration-property.model';
|
import { ConfigurationProperty } from '../core/shared/configuration-property.model';
|
||||||
|
import { SuggestionsNotificationComponent } from '../notifications/suggestions-notification/suggestions-notification.component';
|
||||||
import { NotificationsService } from '../shared/notifications/notifications.service';
|
import { NotificationsService } from '../shared/notifications/notifications.service';
|
||||||
import {
|
import {
|
||||||
createFailedRemoteDataObject$,
|
createFailedRemoteDataObject$,
|
||||||
@@ -126,11 +127,14 @@ describe('ProfilePageComponent', () => {
|
|||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
})
|
})
|
||||||
.overrideComponent(ProfilePageComponent, {
|
.overrideComponent(ProfilePageComponent, {
|
||||||
remove: { imports: [
|
remove: {
|
||||||
ProfilePageMetadataFormComponent,
|
imports: [
|
||||||
ProfilePageSecurityFormComponent,
|
ProfilePageMetadataFormComponent,
|
||||||
ProfilePageResearcherFormComponent,
|
ProfilePageSecurityFormComponent,
|
||||||
] },
|
ProfilePageResearcherFormComponent,
|
||||||
|
SuggestionsNotificationComponent,
|
||||||
|
],
|
||||||
|
},
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
|
|
||||||
import { RegisterEmailFormComponent } from './register-email-form.component';
|
import { RegisterEmailFormComponent } from './register-email-form.component';
|
||||||
import { ThemedRegisterEmailFormComponent } from './themed-registry-email-form.component';
|
import { ThemedRegisterEmailFormComponent } from './themed-registry-email-form.component';
|
||||||
|
@@ -48,7 +48,13 @@ describe('ComcolBrowseByComponent', () => {
|
|||||||
{ provide: ActivatedRoute, useValue: activatedRoute },
|
{ provide: ActivatedRoute, useValue: activatedRoute },
|
||||||
{ provide: ThemeService, useValue: themeService },
|
{ provide: ThemeService, useValue: themeService },
|
||||||
],
|
],
|
||||||
}).compileComponents();
|
})
|
||||||
|
.overrideComponent(ComcolBrowseByComponent, {
|
||||||
|
remove: {
|
||||||
|
imports: [BrowseBySwitcherComponent],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(ComcolBrowseByComponent);
|
fixture = TestBed.createComponent(ComcolBrowseByComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
@@ -17,8 +17,10 @@ import { Item } from '../../../../core/shared/item.model';
|
|||||||
import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model';
|
import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model';
|
||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
||||||
|
import { WorkflowitemActionsComponent } from '../../../mydspace-actions/workflowitem/workflowitem-actions.component';
|
||||||
import { WorkflowItemSearchResult } from '../../../object-collection/shared/workflow-item-search-result.model';
|
import { WorkflowItemSearchResult } from '../../../object-collection/shared/workflow-item-search-result.model';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../remote-data.utils';
|
import { createSuccessfulRemoteDataObject } from '../../../remote-data.utils';
|
||||||
|
import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component';
|
||||||
import { WorkflowItemSearchResultDetailElementComponent } from './workflow-item-search-result-detail-element.component';
|
import { WorkflowItemSearchResultDetailElementComponent } from './workflow-item-search-result-detail-element.component';
|
||||||
|
|
||||||
let component: WorkflowItemSearchResultDetailElementComponent;
|
let component: WorkflowItemSearchResultDetailElementComponent;
|
||||||
@@ -75,6 +77,9 @@ describe('WorkflowItemSearchResultDetailElementComponent', () => {
|
|||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
}).overrideComponent(WorkflowItemSearchResultDetailElementComponent, {
|
}).overrideComponent(WorkflowItemSearchResultDetailElementComponent, {
|
||||||
add: { changeDetection: ChangeDetectionStrategy.Default },
|
add: { changeDetection: ChangeDetectionStrategy.Default },
|
||||||
|
remove: {
|
||||||
|
imports: [ItemDetailPreviewComponent, WorkflowitemActionsComponent],
|
||||||
|
},
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -13,9 +13,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
|
|
||||||
import { LinkService } from '../../../core/cache/builders/link.service';
|
import { LinkService } from '../../../core/cache/builders/link.service';
|
||||||
import { Community } from '../../../core/shared/community.model';
|
import { Community } from '../../../core/shared/community.model';
|
||||||
|
import { ThemedThumbnailComponent } from '../../../thumbnail/themed-thumbnail.component';
|
||||||
import { ActivatedRouteStub } from '../../testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../testing/active-router.stub';
|
||||||
import { CommunityGridElementComponent } from './community-grid-element.component';
|
import { CommunityGridElementComponent } from './community-grid-element.component';
|
||||||
import { ThemedThumbnailComponent } from '../../../thumbnail/themed-thumbnail.component';
|
|
||||||
|
|
||||||
let communityGridElementComponent: CommunityGridElementComponent;
|
let communityGridElementComponent: CommunityGridElementComponent;
|
||||||
let fixture: ComponentFixture<CommunityGridElementComponent>;
|
let fixture: ComponentFixture<CommunityGridElementComponent>;
|
||||||
|
@@ -32,6 +32,7 @@ import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
|||||||
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
||||||
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
||||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||||
|
import { ClaimedTaskActionsComponent } from '../../../mydspace-actions/claimed-task/claimed-task-actions.component';
|
||||||
import { NotificationsService } from '../../../notifications/notifications.service';
|
import { NotificationsService } from '../../../notifications/notifications.service';
|
||||||
import { ClaimedTaskSearchResult } from '../../../object-collection/shared/claimed-task-search-result.model';
|
import { ClaimedTaskSearchResult } from '../../../object-collection/shared/claimed-task-search-result.model';
|
||||||
import {
|
import {
|
||||||
@@ -44,10 +45,8 @@ import { createPaginatedList } from '../../../testing/utils.test';
|
|||||||
import { ThemeService } from '../../../theme-support/theme.service';
|
import { ThemeService } from '../../../theme-support/theme.service';
|
||||||
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
||||||
import { VarDirective } from '../../../utils/var.directive';
|
import { VarDirective } from '../../../utils/var.directive';
|
||||||
import { ClaimedSearchResultListElementComponent } from './claimed-search-result-list-element.component';
|
|
||||||
import { AsyncPipe, NgClass, NgIf } from '@angular/common';
|
|
||||||
import { ThemedItemListPreviewComponent } from '../item-list-preview/themed-item-list-preview.component';
|
import { ThemedItemListPreviewComponent } from '../item-list-preview/themed-item-list-preview.component';
|
||||||
import { ClaimedTaskActionsComponent } from '../../../mydspace-actions/claimed-task/claimed-task-actions.component';
|
import { ClaimedSearchResultListElementComponent } from './claimed-search-result-list-element.component';
|
||||||
|
|
||||||
let component: ClaimedSearchResultListElementComponent;
|
let component: ClaimedSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<ClaimedSearchResultListElementComponent>;
|
let fixture: ComponentFixture<ClaimedSearchResultListElementComponent>;
|
||||||
|
@@ -21,9 +21,11 @@ import { Context } from '../../../../core/shared/context.model';
|
|||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
||||||
|
import { ItemActionsComponent } from '../../../mydspace-actions/item/item-actions.component';
|
||||||
import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
|
import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
|
||||||
import { ThemeService } from '../../../theme-support/theme.service';
|
import { ThemeService } from '../../../theme-support/theme.service';
|
||||||
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
||||||
|
import { ThemedItemListPreviewComponent } from '../item-list-preview/themed-item-list-preview.component';
|
||||||
import { ItemSearchResultListElementSubmissionComponent } from './item-search-result-list-element-submission.component';
|
import { ItemSearchResultListElementSubmissionComponent } from './item-search-result-list-element-submission.component';
|
||||||
|
|
||||||
let component: ItemSearchResultListElementSubmissionComponent;
|
let component: ItemSearchResultListElementSubmissionComponent;
|
||||||
@@ -75,6 +77,9 @@ describe('ItemMyDSpaceResultListElementComponent', () => {
|
|||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
}).overrideComponent(ItemSearchResultListElementSubmissionComponent, {
|
}).overrideComponent(ItemSearchResultListElementSubmissionComponent, {
|
||||||
add: { changeDetection: ChangeDetectionStrategy.Default },
|
add: { changeDetection: ChangeDetectionStrategy.Default },
|
||||||
|
remove: {
|
||||||
|
imports: [ThemedItemListPreviewComponent, ItemActionsComponent],
|
||||||
|
},
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -28,6 +28,7 @@ import { PoolTask } from '../../../../core/tasks/models/pool-task-object.model';
|
|||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
||||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||||
|
import { PoolTaskActionsComponent } from '../../../mydspace-actions/pool-task/pool-task-actions.component';
|
||||||
import { PoolTaskSearchResult } from '../../../object-collection/shared/pool-task-search-result.model';
|
import { PoolTaskSearchResult } from '../../../object-collection/shared/pool-task-search-result.model';
|
||||||
import {
|
import {
|
||||||
createSuccessfulRemoteDataObject,
|
createSuccessfulRemoteDataObject,
|
||||||
@@ -37,6 +38,7 @@ import { createPaginatedList } from '../../../testing/utils.test';
|
|||||||
import { ThemeService } from '../../../theme-support/theme.service';
|
import { ThemeService } from '../../../theme-support/theme.service';
|
||||||
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
||||||
import { VarDirective } from '../../../utils/var.directive';
|
import { VarDirective } from '../../../utils/var.directive';
|
||||||
|
import { ThemedItemListPreviewComponent } from '../item-list-preview/themed-item-list-preview.component';
|
||||||
import { PoolSearchResultListElementComponent } from './pool-search-result-list-element.component';
|
import { PoolSearchResultListElementComponent } from './pool-search-result-list-element.component';
|
||||||
|
|
||||||
let component: PoolSearchResultListElementComponent;
|
let component: PoolSearchResultListElementComponent;
|
||||||
@@ -123,6 +125,9 @@ describe('PoolSearchResultListElementComponent', () => {
|
|||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
}).overrideComponent(PoolSearchResultListElementComponent, {
|
}).overrideComponent(PoolSearchResultListElementComponent, {
|
||||||
add: { changeDetection: ChangeDetectionStrategy.Default },
|
add: { changeDetection: ChangeDetectionStrategy.Default },
|
||||||
|
remove: {
|
||||||
|
imports: [ThemedItemListPreviewComponent, PoolTaskActionsComponent],
|
||||||
|
},
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -21,9 +21,12 @@ import { ItemDataService } from '../../../../core/data/item-data.service';
|
|||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model';
|
import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model';
|
||||||
|
import { ThemedLoadingComponent } from '../../../loading/themed-loading.component';
|
||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
||||||
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
||||||
|
import { WorkflowitemActionsComponent } from '../../../mydspace-actions/workflowitem/workflowitem-actions.component';
|
||||||
|
import { ListableObjectComponentLoaderComponent } from '../../../object-collection/shared/listable-object/listable-object-component-loader.component';
|
||||||
import { WorkflowItemSearchResult } from '../../../object-collection/shared/workflow-item-search-result.model';
|
import { WorkflowItemSearchResult } from '../../../object-collection/shared/workflow-item-search-result.model';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../remote-data.utils';
|
import { createSuccessfulRemoteDataObject } from '../../../remote-data.utils';
|
||||||
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
import { TruncatableService } from '../../../truncatable/truncatable.service';
|
||||||
@@ -92,6 +95,9 @@ describe('WorkflowItemSearchResultListElementComponent', () => {
|
|||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
}).overrideComponent(WorkflowItemSearchResultListElementComponent, {
|
}).overrideComponent(WorkflowItemSearchResultListElementComponent, {
|
||||||
add: { changeDetection: ChangeDetectionStrategy.Default },
|
add: { changeDetection: ChangeDetectionStrategy.Default },
|
||||||
|
remove: {
|
||||||
|
imports: [ListableObjectComponentLoaderComponent, WorkflowitemActionsComponent, ThemedLoadingComponent],
|
||||||
|
},
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -21,10 +21,13 @@ import { ItemDataService } from '../../../../core/data/item-data.service';
|
|||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
import { WorkspaceItem } from '../../../../core/submission/models/workspaceitem.model';
|
import { WorkspaceItem } from '../../../../core/submission/models/workspaceitem.model';
|
||||||
|
import { ThemedLoadingComponent } from '../../../loading/themed-loading.component';
|
||||||
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../mocks/dso-name.service.mock';
|
||||||
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
import { getMockLinkService } from '../../../mocks/link-service.mock';
|
||||||
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../../mocks/mock-trucatable.service';
|
||||||
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../mocks/theme-service.mock';
|
||||||
|
import { WorkspaceitemActionsComponent } from '../../../mydspace-actions/workspaceitem/workspaceitem-actions.component';
|
||||||
|
import { ListableObjectComponentLoaderComponent } from '../../../object-collection/shared/listable-object/listable-object-component-loader.component';
|
||||||
import { WorkflowItemSearchResult } from '../../../object-collection/shared/workflow-item-search-result.model';
|
import { WorkflowItemSearchResult } from '../../../object-collection/shared/workflow-item-search-result.model';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../remote-data.utils';
|
import { createSuccessfulRemoteDataObject } from '../../../remote-data.utils';
|
||||||
import { ThemeService } from '../../../theme-support/theme.service';
|
import { ThemeService } from '../../../theme-support/theme.service';
|
||||||
@@ -94,6 +97,9 @@ describe('WorkspaceItemSearchResultListElementComponent', () => {
|
|||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
}).overrideComponent(WorkspaceItemSearchResultListElementComponent, {
|
}).overrideComponent(WorkspaceItemSearchResultListElementComponent, {
|
||||||
add: { changeDetection: ChangeDetectionStrategy.Default },
|
add: { changeDetection: ChangeDetectionStrategy.Default },
|
||||||
|
remove: {
|
||||||
|
imports: [ListableObjectComponentLoaderComponent, WorkspaceitemActionsComponent, ThemedLoadingComponent],
|
||||||
|
},
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -5,7 +5,13 @@ import {
|
|||||||
tick,
|
tick,
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
|
import { ErrorComponent } from '../error/error.component';
|
||||||
|
import { ThemedLoadingComponent } from '../loading/themed-loading.component';
|
||||||
|
import { TabulatableObjectsLoaderComponent } from '../object-collection/shared/tabulatable-objects/tabulatable-objects-loader.component';
|
||||||
|
import { PaginationComponent } from '../pagination/pagination.component';
|
||||||
|
import { ActivatedRouteStub } from '../testing/active-router.stub';
|
||||||
import { ObjectTableComponent } from './object-table.component';
|
import { ObjectTableComponent } from './object-table.component';
|
||||||
|
|
||||||
describe('ObjectTableComponent', () => {
|
describe('ObjectTableComponent', () => {
|
||||||
@@ -17,7 +23,20 @@ describe('ObjectTableComponent', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [ObjectTableComponent],
|
imports: [ObjectTableComponent],
|
||||||
|
providers: [
|
||||||
|
{ provide: ActivatedRoute, useValue: new ActivatedRouteStub() },
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
.overrideComponent(ObjectTableComponent, {
|
||||||
|
remove: {
|
||||||
|
imports: [
|
||||||
|
PaginationComponent,
|
||||||
|
ThemedLoadingComponent,
|
||||||
|
ErrorComponent,
|
||||||
|
TabulatableObjectsLoaderComponent,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(ObjectTableComponent);
|
fixture = TestBed.createComponent(ObjectTableComponent);
|
||||||
|
@@ -20,6 +20,7 @@ import {
|
|||||||
Router,
|
Router,
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
|
import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core';
|
||||||
import { provideMockStore } from '@ngrx/store/testing';
|
import { provideMockStore } from '@ngrx/store/testing';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { getTestScheduler } from 'jasmine-marbles';
|
import { getTestScheduler } from 'jasmine-marbles';
|
||||||
@@ -67,7 +68,6 @@ import {
|
|||||||
ResourcePolicyEvent,
|
ResourcePolicyEvent,
|
||||||
ResourcePolicyFormComponent,
|
ResourcePolicyFormComponent,
|
||||||
} from './resource-policy-form.component';
|
} from './resource-policy-form.component';
|
||||||
import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core';
|
|
||||||
|
|
||||||
export const mockResourcePolicyFormData = {
|
export const mockResourcePolicyFormData = {
|
||||||
name: [
|
name: [
|
||||||
|
Reference in New Issue
Block a user