mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-7604] fixed text highlight on search page
This commit is contained in:
@@ -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]="firstMetadataValue('dc.title') || 'Undefined'"></a>
|
||||
[innerHTML]="firstMetadataValue('dc.title') ?? dsoTitle"></a>
|
||||
<span *ngIf="linkType == linkTypes.None" class="lead item-list-title dont-break-out"
|
||||
[innerHTML]="firstMetadataValue('dc.title') || 'Undefined'"></span>
|
||||
[innerHTML]="firstMetadataValue('dc.title') ?? dsoTitle"></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')">
|
||||
|
@@ -13,7 +13,7 @@ import { APP_CONFIG } from '../../../../../../../config/app-config.interface';
|
||||
|
||||
let publicationListElementComponent: ItemSearchResultListElementComponent;
|
||||
let fixture: ComponentFixture<ItemSearchResultListElementComponent>;
|
||||
|
||||
const dcTitle = 'This is just another <em>title</em>';
|
||||
const mockItemWithMetadata: ItemSearchResult = Object.assign(new ItemSearchResult(), {
|
||||
indexableObject:
|
||||
Object.assign(new Item(), {
|
||||
@@ -22,7 +22,7 @@ const mockItemWithMetadata: ItemSearchResult = Object.assign(new ItemSearchResul
|
||||
'dc.title': [
|
||||
{
|
||||
language: 'en_US',
|
||||
value: 'This is just another title'
|
||||
value: dcTitle
|
||||
}
|
||||
],
|
||||
'dc.contributor.author': [
|
||||
@@ -211,9 +211,9 @@ describe('ItemSearchResultListElementComponent', () => {
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should show the title', () => {
|
||||
it('should show highlighted title', () => {
|
||||
const titleField = fixture.debugElement.query(By.css('.item-list-title'));
|
||||
expect(titleField).not.toBeNull();
|
||||
expect(titleField.nativeNode.innerHTML).toEqual(dcTitle);
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user