[CST-7604] fixed text highlight on search page

This commit is contained in:
Nikunj Sharma
2022-11-18 15:14:55 +05:30
parent 89447a6c32
commit 7d58a1eb0a
2 changed files with 14 additions and 2 deletions

View File

@@ -19,9 +19,9 @@
<ds-truncatable [id]="dso.id" *ngIf="object !== undefined && object !== null">
<a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer"
[routerLink]="[itemPageRoute]" class="lead item-list-title dont-break-out"
[innerHTML]="dsoTitle"></a>
[innerHTML]="firstMetadataValue('dc.title') || 'Undefined'"></a>
<span *ngIf="linkType == linkTypes.None" class="lead item-list-title dont-break-out"
[innerHTML]="dsoTitle"></span>
[innerHTML]="firstMetadataValue('dc.title') || 'Undefined'"></span>
<span class="text-muted">
<ds-truncatable-part [id]="dso.id" [minLines]="1">
<ng-container *ngIf="dso.firstMetadataValue('dc.publisher') || dso.firstMetadataValue('dc.date.issued')">

View File

@@ -205,6 +205,18 @@ describe('ItemSearchResultListElementComponent', () => {
});
});
describe('When the item has title', () => {
beforeEach(() => {
publicationListElementComponent.object = mockItemWithMetadata;
fixture.detectChanges();
});
it('should show the title', () => {
const titleField = fixture.debugElement.query(By.css('.item-list-title'));
expect(titleField).not.toBeNull();
});
});
describe('When the item has no title', () => {
beforeEach(() => {
publicationListElementComponent.object = mockItemWithoutMetadata;