mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 06:23:03 +00:00
[CST-7604] test cases update
This commit is contained in:
@@ -9,11 +9,19 @@ export class DSONameServiceMock {
|
||||
|
||||
public getHitHighlights(object: any, dso: DSpaceObject) {
|
||||
if (object.hitHighlights && object.hitHighlights['dc.title']) {
|
||||
return object.hitHighlights['dc.title'][0];
|
||||
return object.hitHighlights['dc.title'][0].value;
|
||||
} else if (object.hitHighlights && object.hitHighlights['organization.legalName']) {
|
||||
return object.hitHighlights['organization.legalName'][0];
|
||||
return object.hitHighlights['organization.legalName'][0].value;
|
||||
} else if (object.hitHighlights && (object.hitHighlights['person.familyName'] || object.hitHighlights['person.givenName'])) {
|
||||
return `${object.hitHighlights['person.familyName'][0] || ''}, ${object.hitHighlights['person.givenName'][0] || ''}`;
|
||||
if (object.hitHighlights['person.familyName'] && object.hitHighlights['person.givenName']) {
|
||||
return `${object.hitHighlights['person.familyName'][0].value}, ${object.hitHighlights['person.givenName'][0].value}`;
|
||||
}
|
||||
if (object.hitHighlights['person.familyName']) {
|
||||
return `${object.hitHighlights['person.familyName'][0].value}`;
|
||||
}
|
||||
if (object.hitHighlights['person.givenName']) {
|
||||
return `${object.hitHighlights['person.givenName'][0].value}`;
|
||||
}
|
||||
}
|
||||
return UNDEFINED_NAME;
|
||||
}
|
||||
|
Reference in New Issue
Block a user