Skip to content

Commit

Permalink
fix(DH): Make sure that the content ghost for abstract is shown
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Oct 24, 2023
1 parent bf058f0 commit f6c3fe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
>
record.metadata.about
</p>
<div
class="text-gray-900 mb-6 md-description sm:mb-4 sm:pr-16"
*ngIf="metadata.abstract"
>
<div class="text-gray-900 mb-6 md-description sm:mb-4 sm:pr-16">
<gn-ui-content-ghost ghostClass="h-32" [showContent]="fieldReady('abstract')">
<p
class="whitespace-pre-line break-words"
[innerHTML]="metadata.abstract | safe: 'html'"
*ngIf="metadata.abstract"
></p>
</gn-ui-content-ghost>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('MetadataInfoComponent', () => {
})
it('should not display the abstract section', () => {
const displayedElement =
fixture.nativeElement.querySelector('.md-description')
fixture.nativeElement.querySelector('.md-description p')
expect(displayedElement).toBeFalsy()
})
})
Expand All @@ -69,7 +69,7 @@ describe('MetadataInfoComponent', () => {
})
it('should display the abstract section', () => {
const displayedElement =
fixture.nativeElement.querySelector('.md-description')
fixture.nativeElement.querySelector('.md-description p')
expect(displayedElement).toBeTruthy()
})
})
Expand Down

0 comments on commit f6c3fe5

Please sign in to comment.