mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00

Conflicts: src/app/core/shared/item.model.ts src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.spec.ts src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.spec.ts src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.spec.ts src/app/entity-groups/journal-entities/item-list-elements/journal-issue/journal-issue-list-element.component.spec.ts src/app/entity-groups/journal-entities/item-list-elements/journal-volume/journal-volume-list-element.component.spec.ts src/app/entity-groups/journal-entities/item-list-elements/journal/journal-list-element.component.spec.ts src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.spec.ts src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.spec.ts src/app/entity-groups/research-entities/item-list-elements/orgunit/orgunit-list-element.component.spec.ts src/app/entity-groups/research-entities/item-list-elements/person/person-list-element.component.spec.ts src/app/entity-groups/research-entities/item-list-elements/project/project-list-element.component.spec.ts src/app/shared/object-grid/item-grid-element/item-grid-element.component.spec.ts src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec.ts src/app/shared/object-list/item-list-element/item-types/publication/publication-list-element.component.spec.ts src/app/shared/testing/utils.ts
44 lines
1.8 KiB
TypeScript
44 lines
1.8 KiB
TypeScript
import { ItemSearchResult } from '../../../../../shared/object-collection/shared/item-search-result.model';
|
|
import { Item } from '../../../../../core/shared/item.model';
|
|
import { createSuccessfulRemoteDataObject$ } from '../../../../../shared/testing/utils';
|
|
import { PaginatedList } from '../../../../../core/data/paginated-list';
|
|
import { PageInfo } from '../../../../../core/shared/page-info.model';
|
|
import { ProjectSearchResultGridElementComponent } from './project-search-result-grid-element.component';
|
|
import { getEntityGridElementTestComponent } from '../../../../../shared/object-grid/search-result-grid-element/item-search-result/publication/publication-search-result-grid-element.component.spec';
|
|
|
|
const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
|
|
mockItemWithMetadata.hitHighlights = {};
|
|
mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
|
|
bundles: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])),
|
|
metadata: {
|
|
'dc.title': [
|
|
{
|
|
language: 'en_US',
|
|
value: 'This is just another title'
|
|
}
|
|
],
|
|
'dc.description': [
|
|
{
|
|
language: 'en_US',
|
|
value: 'The project description'
|
|
}
|
|
]
|
|
}
|
|
});
|
|
|
|
const mockItemWithoutMetadata: ItemSearchResult = new ItemSearchResult();
|
|
mockItemWithoutMetadata.hitHighlights = {};
|
|
mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
|
|
bundles: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])),
|
|
metadata: {
|
|
'dc.title': [
|
|
{
|
|
language: 'en_US',
|
|
value: 'This is just another title'
|
|
}
|
|
]
|
|
}
|
|
});
|
|
|
|
describe('ProjectSearchResultGridElementComponent', getEntityGridElementTestComponent(ProjectSearchResultGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['description']));
|