mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-7755] Build Failded Fixed
This commit is contained in:
@@ -13,7 +13,7 @@ import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
|||||||
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
||||||
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../../../../shared/remote-data.utils';
|
||||||
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
||||||
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
||||||
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
||||||
@@ -24,6 +24,8 @@ import { EPersonDataService } from '../../../../../core/eperson/eperson-data.ser
|
|||||||
import { ResourcePolicyDataService } from '../../../../../core/resource-policy/resource-policy-data.service';
|
import { ResourcePolicyDataService } from '../../../../../core/resource-policy/resource-policy-data.service';
|
||||||
import { AuthServiceStub } from '../../../../../shared/testing/auth-service.stub';
|
import { AuthServiceStub } from '../../../../../shared/testing/auth-service.stub';
|
||||||
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
||||||
|
import { EPerson } from '../../../../../core/eperson/models/eperson.model';
|
||||||
|
import { createPaginatedList } from '../../../../../shared/testing/utils.test';
|
||||||
|
|
||||||
let journalIssueListElementComponent: JournalIssueSearchResultListElementComponent;
|
let journalIssueListElementComponent: JournalIssueSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<JournalIssueSearchResultListElementComponent>;
|
let fixture: ComponentFixture<JournalIssueSearchResultListElementComponent>;
|
||||||
@@ -37,6 +39,15 @@ const authService: AuthServiceStub = Object.assign(new AuthServiceStub(), {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const user = Object.assign(new EPerson(), {
|
||||||
|
id: 'userId',
|
||||||
|
groups: createSuccessfulRemoteDataObject$(createPaginatedList([])),
|
||||||
|
_links: { self: { href: 'test.com/uuid/1234567654321' } }
|
||||||
|
});
|
||||||
|
const epersonService = jasmine.createSpyObj('epersonService', {
|
||||||
|
findById: createSuccessfulRemoteDataObject$(user),
|
||||||
|
});
|
||||||
|
|
||||||
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
||||||
new ItemSearchResult(),
|
new ItemSearchResult(),
|
||||||
{
|
{
|
||||||
@@ -150,7 +161,7 @@ describe('JournalIssueSearchResultListElementComponent', () => {
|
|||||||
{ provide: TranslateService, useValue: {}},
|
{ provide: TranslateService, useValue: {}},
|
||||||
{ provide: ResourcePolicyDataService, useValue: {}},
|
{ provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{ provide: AuthService, useValue: authService},
|
{ provide: AuthService, useValue: authService},
|
||||||
{ provide: EPersonDataService, useValue: {}},
|
{ provide: EPersonDataService, useValue: epersonService},
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService},
|
{ provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||||
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
||||||
@@ -248,7 +259,7 @@ describe('JournalIssueSearchResultListElementComponent', () => {
|
|||||||
{provide: TranslateService, useValue: {}},
|
{provide: TranslateService, useValue: {}},
|
||||||
{provide: ResourcePolicyDataService, useValue: {}},
|
{provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{provide: AuthService, useValue: authService},
|
{provide: AuthService, useValue: authService},
|
||||||
{provide: EPersonDataService, useValue: {}},
|
{provide: EPersonDataService, useValue: epersonService},
|
||||||
{provide: AuthorizationDataService, useValue: authorizationService},
|
{provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{provide: DSONameService, useClass: DSONameServiceMock},
|
{provide: DSONameService, useClass: DSONameServiceMock},
|
||||||
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
||||||
|
@@ -13,7 +13,7 @@ import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
|||||||
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
||||||
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../../../../shared/remote-data.utils';
|
||||||
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
||||||
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
||||||
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
||||||
@@ -24,6 +24,8 @@ import { EPersonDataService } from '../../../../../core/eperson/eperson-data.ser
|
|||||||
import { AuthorizationDataService } from '../../../../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../../../../core/data/feature-authorization/authorization-data.service';
|
||||||
import { AuthServiceStub } from '../../../../../shared/testing/auth-service.stub';
|
import { AuthServiceStub } from '../../../../../shared/testing/auth-service.stub';
|
||||||
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
||||||
|
import { EPerson } from '../../../../../core/eperson/models/eperson.model';
|
||||||
|
import { createPaginatedList } from '../../../../../shared/testing/utils.test';
|
||||||
|
|
||||||
let journalVolumeListElementComponent: JournalVolumeSearchResultListElementComponent;
|
let journalVolumeListElementComponent: JournalVolumeSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<JournalVolumeSearchResultListElementComponent>;
|
let fixture: ComponentFixture<JournalVolumeSearchResultListElementComponent>;
|
||||||
@@ -36,6 +38,15 @@ const authService: AuthServiceStub = Object.assign(new AuthServiceStub(), {
|
|||||||
return of(EPersonMock);
|
return of(EPersonMock);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const user = Object.assign(new EPerson(), {
|
||||||
|
id: 'userId',
|
||||||
|
groups: createSuccessfulRemoteDataObject$(createPaginatedList([])),
|
||||||
|
_links: { self: { href: 'test.com/uuid/1234567654321' } }
|
||||||
|
});
|
||||||
|
const epersonService = jasmine.createSpyObj('epersonService', {
|
||||||
|
findById: createSuccessfulRemoteDataObject$(user),
|
||||||
|
});
|
||||||
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
||||||
new ItemSearchResult(),
|
new ItemSearchResult(),
|
||||||
{
|
{
|
||||||
@@ -148,7 +159,7 @@ describe('JournalVolumeSearchResultListElementComponent', () => {
|
|||||||
{ provide: TranslateService, useValue: {}},
|
{ provide: TranslateService, useValue: {}},
|
||||||
{ provide: ResourcePolicyDataService, useValue: {}},
|
{ provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{ provide: AuthService, useValue: authService},
|
{ provide: AuthService, useValue: authService},
|
||||||
{ provide: EPersonDataService, useValue: {}},
|
{ provide: EPersonDataService, useValue: epersonService},
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService},
|
{ provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||||
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
||||||
@@ -245,7 +256,7 @@ describe('JournalVolumeSearchResultListElementComponent', () => {
|
|||||||
{provide: TranslateService, useValue: {}},
|
{provide: TranslateService, useValue: {}},
|
||||||
{provide: ResourcePolicyDataService, useValue: {}},
|
{provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{provide: AuthService, useValue: authService},
|
{provide: AuthService, useValue: authService},
|
||||||
{provide: EPersonDataService, useValue: {}},
|
{provide: EPersonDataService, useValue: epersonService},
|
||||||
{provide: AuthorizationDataService, useValue: authorizationService},
|
{provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{provide: DSONameService, useClass: DSONameServiceMock},
|
{provide: DSONameService, useClass: DSONameServiceMock},
|
||||||
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
||||||
|
@@ -13,7 +13,7 @@ import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
|||||||
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
||||||
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../../../../shared/remote-data.utils';
|
||||||
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
||||||
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
||||||
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
||||||
@@ -24,6 +24,8 @@ import { AuthorizationDataService } from '../../../../../core/data/feature-autho
|
|||||||
import { EPersonDataService } from '../../../../../core/eperson/eperson-data.service';
|
import { EPersonDataService } from '../../../../../core/eperson/eperson-data.service';
|
||||||
import { ResourcePolicyDataService } from '../../../../../core/resource-policy/resource-policy-data.service';
|
import { ResourcePolicyDataService } from '../../../../../core/resource-policy/resource-policy-data.service';
|
||||||
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
||||||
|
import { EPerson } from '../../../../../core/eperson/models/eperson.model';
|
||||||
|
import { createPaginatedList } from '../../../../../shared/testing/utils.test';
|
||||||
|
|
||||||
let journalListElementComponent: JournalSearchResultListElementComponent;
|
let journalListElementComponent: JournalSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<JournalSearchResultListElementComponent>;
|
let fixture: ComponentFixture<JournalSearchResultListElementComponent>;
|
||||||
@@ -36,6 +38,14 @@ const authService: AuthServiceStub = Object.assign(new AuthServiceStub(), {
|
|||||||
return of(EPersonMock);
|
return of(EPersonMock);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const user = Object.assign(new EPerson(), {
|
||||||
|
id: 'userId',
|
||||||
|
groups: createSuccessfulRemoteDataObject$(createPaginatedList([])),
|
||||||
|
_links: { self: { href: 'test.com/uuid/1234567654321' } }
|
||||||
|
});
|
||||||
|
const epersonService = jasmine.createSpyObj('epersonService', {
|
||||||
|
findById: createSuccessfulRemoteDataObject$(user),
|
||||||
|
});
|
||||||
|
|
||||||
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
||||||
new ItemSearchResult(),
|
new ItemSearchResult(),
|
||||||
@@ -145,7 +155,7 @@ describe('JournalSearchResultListElementComponent', () => {
|
|||||||
{ provide: TranslateService, useValue: {}},
|
{ provide: TranslateService, useValue: {}},
|
||||||
{ provide: ResourcePolicyDataService, useValue: {}},
|
{ provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{ provide: AuthService, useValue: authService},
|
{ provide: AuthService, useValue: authService},
|
||||||
{ provide: EPersonDataService, useValue: {}},
|
{ provide: EPersonDataService, useValue: epersonService},
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService},
|
{ provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||||
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
||||||
@@ -218,7 +228,7 @@ describe('JournalSearchResultListElementComponent', () => {
|
|||||||
{provide: TranslateService, useValue: {}},
|
{provide: TranslateService, useValue: {}},
|
||||||
{provide: ResourcePolicyDataService, useValue: {}},
|
{provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{provide: AuthService, useValue: authService},
|
{provide: AuthService, useValue: authService},
|
||||||
{provide: EPersonDataService, useValue: {}},
|
{provide: EPersonDataService, useValue: epersonService},
|
||||||
{provide: AuthorizationDataService, useValue: authorizationService},
|
{provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{provide: DSONameService, useClass: DSONameServiceMock},
|
{provide: DSONameService, useClass: DSONameServiceMock},
|
||||||
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
||||||
|
@@ -14,7 +14,7 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
|||||||
import { TranslateLoaderMock } from '../../../../../shared/mocks/translate-loader.mock';
|
import { TranslateLoaderMock } from '../../../../../shared/mocks/translate-loader.mock';
|
||||||
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
||||||
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../../../../shared/remote-data.utils';
|
||||||
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
||||||
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
||||||
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
||||||
@@ -25,6 +25,8 @@ import { EPersonDataService } from '../../../../../core/eperson/eperson-data.ser
|
|||||||
import { ResourcePolicyDataService } from '../../../../../core/resource-policy/resource-policy-data.service';
|
import { ResourcePolicyDataService } from '../../../../../core/resource-policy/resource-policy-data.service';
|
||||||
import { AuthServiceStub } from '../../../../../shared/testing/auth-service.stub';
|
import { AuthServiceStub } from '../../../../../shared/testing/auth-service.stub';
|
||||||
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
||||||
|
import { EPerson } from '../../../../../core/eperson/models/eperson.model';
|
||||||
|
import { createPaginatedList } from '../../../../../shared/testing/utils.test';
|
||||||
|
|
||||||
let orgUnitListElementComponent: OrgUnitSearchResultListElementComponent;
|
let orgUnitListElementComponent: OrgUnitSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<OrgUnitSearchResultListElementComponent>;
|
let fixture: ComponentFixture<OrgUnitSearchResultListElementComponent>;
|
||||||
@@ -37,6 +39,14 @@ const authService: AuthServiceStub = Object.assign(new AuthServiceStub(), {
|
|||||||
return of(EPersonMock);
|
return of(EPersonMock);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const user = Object.assign(new EPerson(), {
|
||||||
|
id: 'userId',
|
||||||
|
groups: createSuccessfulRemoteDataObject$(createPaginatedList([])),
|
||||||
|
_links: { self: { href: 'test.com/uuid/1234567654321' } }
|
||||||
|
});
|
||||||
|
const epersonService = jasmine.createSpyObj('epersonService', {
|
||||||
|
findById: createSuccessfulRemoteDataObject$(user),
|
||||||
|
});
|
||||||
|
|
||||||
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
||||||
new ItemSearchResult(),
|
new ItemSearchResult(),
|
||||||
@@ -150,7 +160,7 @@ describe('OrgUnitSearchResultListElementComponent', () => {
|
|||||||
{ provide: NotificationsService, useValue: {}},
|
{ provide: NotificationsService, useValue: {}},
|
||||||
{ provide: ResourcePolicyDataService, useValue: {}},
|
{ provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{ provide: AuthService, useValue: authService},
|
{ provide: AuthService, useValue: authService},
|
||||||
{ provide: EPersonDataService, useValue: {}},
|
{ provide: EPersonDataService, useValue: epersonService},
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService},
|
{ provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||||
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
||||||
@@ -229,7 +239,7 @@ describe('OrgUnitSearchResultListElementComponent', () => {
|
|||||||
{provide: NotificationsService, useValue: {}},
|
{provide: NotificationsService, useValue: {}},
|
||||||
{provide: ResourcePolicyDataService, useValue: {}},
|
{provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{provide: AuthService, useValue: authService},
|
{provide: AuthService, useValue: authService},
|
||||||
{provide: EPersonDataService, useValue: {}},
|
{provide: EPersonDataService, useValue: epersonService},
|
||||||
{provide: AuthorizationDataService, useValue: authorizationService},
|
{provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{provide: DSONameService, useClass: DSONameServiceMock},
|
{provide: DSONameService, useClass: DSONameServiceMock},
|
||||||
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
||||||
|
@@ -14,7 +14,7 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
|||||||
import { TranslateLoaderMock } from '../../../../../shared/mocks/translate-loader.mock';
|
import { TranslateLoaderMock } from '../../../../../shared/mocks/translate-loader.mock';
|
||||||
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
||||||
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../../../../shared/remote-data.utils';
|
||||||
import { hot } from 'jasmine-marbles';
|
import { hot } from 'jasmine-marbles';
|
||||||
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
||||||
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
||||||
@@ -25,6 +25,8 @@ import { ResourcePolicyDataService } from '../../../../../core/resource-policy/r
|
|||||||
import { AuthService } from '../../../../../core/auth/auth.service';
|
import { AuthService } from '../../../../../core/auth/auth.service';
|
||||||
import { AuthorizationDataService } from '../../../../../core/data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../../../../../core/data/feature-authorization/authorization-data.service';
|
||||||
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 { createPaginatedList } from '../../../../../shared/testing/utils.test';
|
||||||
|
|
||||||
let personListElementComponent: PersonSearchResultListElementComponent;
|
let personListElementComponent: PersonSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<PersonSearchResultListElementComponent>;
|
let fixture: ComponentFixture<PersonSearchResultListElementComponent>;
|
||||||
@@ -40,6 +42,14 @@ const authService: AuthServiceStub = Object.assign(new AuthServiceStub(), {
|
|||||||
return of(EPersonMock);
|
return of(EPersonMock);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const user = Object.assign(new EPerson(), {
|
||||||
|
id: 'userId',
|
||||||
|
groups: createSuccessfulRemoteDataObject$(createPaginatedList([])),
|
||||||
|
_links: { self: { href: 'test.com/uuid/1234567654321' } }
|
||||||
|
});
|
||||||
|
const epersonService = jasmine.createSpyObj('epersonService', {
|
||||||
|
findById: createSuccessfulRemoteDataObject$(user),
|
||||||
|
});
|
||||||
|
|
||||||
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
||||||
new ItemSearchResult(),
|
new ItemSearchResult(),
|
||||||
@@ -149,7 +159,7 @@ describe('PersonSearchResultListElementComponent', () => {
|
|||||||
{ provide: NotificationsService, useValue: {} },
|
{ provide: NotificationsService, useValue: {} },
|
||||||
{ provide: ResourcePolicyDataService, useValue: {}},
|
{ provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{ provide: AuthService, useValue: authService},
|
{ provide: AuthService, useValue: authService},
|
||||||
{ provide: EPersonDataService, useValue: {}},
|
{ provide: EPersonDataService, useValue: epersonService},
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService},
|
{ provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||||
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
||||||
@@ -228,7 +238,7 @@ describe('PersonSearchResultListElementComponent', () => {
|
|||||||
{provide: NotificationsService, useValue: {}},
|
{provide: NotificationsService, useValue: {}},
|
||||||
{provide: ResourcePolicyDataService, useValue: {}},
|
{provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{provide: AuthService, useValue: authService},
|
{provide: AuthService, useValue: authService},
|
||||||
{provide: EPersonDataService, useValue: {}},
|
{provide: EPersonDataService, useValue: epersonService},
|
||||||
{provide: AuthorizationDataService, useValue: authorizationService},
|
{provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{provide: DSONameService, useClass: DSONameServiceMock},
|
{provide: DSONameService, useClass: DSONameServiceMock},
|
||||||
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
||||||
|
@@ -13,7 +13,7 @@ import { APP_CONFIG } from '../../../../../../config/app-config.interface';
|
|||||||
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service';
|
||||||
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../../shared/notifications/notifications.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { createSuccessfulRemoteDataObject } from '../../../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$ } from '../../../../../shared/remote-data.utils';
|
||||||
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
||||||
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
import { buildPaginatedList } from '../../../../../core/data/paginated-list.model';
|
||||||
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
import { GroupMock } from '../../../../../shared/testing/group-mock';
|
||||||
@@ -24,6 +24,8 @@ import { EPersonDataService } from '../../../../../core/eperson/eperson-data.ser
|
|||||||
import { ResourcePolicyDataService } from '../../../../../core/resource-policy/resource-policy-data.service';
|
import { ResourcePolicyDataService } from '../../../../../core/resource-policy/resource-policy-data.service';
|
||||||
import { AuthServiceStub } from '../../../../../shared/testing/auth-service.stub';
|
import { AuthServiceStub } from '../../../../../shared/testing/auth-service.stub';
|
||||||
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
import { EPersonMock } from '../../../../../shared/testing/eperson.mock';
|
||||||
|
import { EPerson } from '../../../../../core/eperson/models/eperson.model';
|
||||||
|
import { createPaginatedList } from '../../../../../shared/testing/utils.test';
|
||||||
|
|
||||||
let projectListElementComponent: ProjectSearchResultListElementComponent;
|
let projectListElementComponent: ProjectSearchResultListElementComponent;
|
||||||
let fixture: ComponentFixture<ProjectSearchResultListElementComponent>;
|
let fixture: ComponentFixture<ProjectSearchResultListElementComponent>;
|
||||||
@@ -37,6 +39,15 @@ const authService: AuthServiceStub = Object.assign(new AuthServiceStub(), {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const user = Object.assign(new EPerson(), {
|
||||||
|
id: 'userId',
|
||||||
|
groups: createSuccessfulRemoteDataObject$(createPaginatedList([])),
|
||||||
|
_links: { self: { href: 'test.com/uuid/1234567654321' } }
|
||||||
|
});
|
||||||
|
const epersonService = jasmine.createSpyObj('epersonService', {
|
||||||
|
findById: createSuccessfulRemoteDataObject$(user),
|
||||||
|
});
|
||||||
|
|
||||||
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
const mockItemWithMetadata: ItemSearchResult = Object.assign(
|
||||||
new ItemSearchResult(),
|
new ItemSearchResult(),
|
||||||
{
|
{
|
||||||
@@ -144,7 +155,7 @@ describe('ProjectSearchResultListElementComponent', () => {
|
|||||||
{ provide: TranslateService, useValue: {}},
|
{ provide: TranslateService, useValue: {}},
|
||||||
{ provide: ResourcePolicyDataService, useValue: {}},
|
{ provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{ provide: AuthService, useValue: authService},
|
{ provide: AuthService, useValue: authService},
|
||||||
{ provide: EPersonDataService, useValue: {}},
|
{ provide: EPersonDataService, useValue: epersonService},
|
||||||
{ provide: AuthorizationDataService, useValue: authorizationService},
|
{ provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{ provide: DSONameService, useClass: DSONameServiceMock },
|
{ provide: DSONameService, useClass: DSONameServiceMock },
|
||||||
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
{ provide: APP_CONFIG, useValue: environmentUseThumbs }
|
||||||
@@ -217,7 +228,7 @@ describe('ProjectSearchResultListElementComponent', () => {
|
|||||||
{provide: TranslateService, useValue: {}},
|
{provide: TranslateService, useValue: {}},
|
||||||
{provide: ResourcePolicyDataService, useValue: {}},
|
{provide: ResourcePolicyDataService, useValue: {}},
|
||||||
{provide: AuthService, useValue: authService},
|
{provide: AuthService, useValue: authService},
|
||||||
{provide: EPersonDataService, useValue: {}},
|
{provide: EPersonDataService, useValue: epersonService},
|
||||||
{provide: AuthorizationDataService, useValue: authorizationService},
|
{provide: AuthorizationDataService, useValue: authorizationService},
|
||||||
{provide: DSONameService, useClass: DSONameServiceMock},
|
{provide: DSONameService, useClass: DSONameServiceMock},
|
||||||
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
{ provide: APP_CONFIG, useValue: enviromentNoThumbs }
|
||||||
|
Reference in New Issue
Block a user