Skip to content

Commit

Permalink
fix(libs): Show metadata origin
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Nov 7, 2023
1 parent d42c29a commit 871172f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@
</ng-container>

<gn-ui-expandable-panel
*ngIf="metadata.lineage"
class="metadata-origin"
*ngIf="
metadata.lineage ||
metadata.recordUpdated ||
metadata.updateFrequency ||
metadata.status
"
[title]="'record.metadata.origin' | translate"
>
<p class="mb-5 pt-4 whitespace-pre-line break-words" gnUiLinkify>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('MetadataInfoComponent', () => {
beforeEach(() => {
fixture = TestBed.createComponent(MetadataInfoComponent)
component = fixture.componentInstance
component.metadata = DATASET_RECORDS[0]
component.metadata = { ...DATASET_RECORDS[0], lineage: null }
fixture.detectChanges()
})
it('should not display a message for no usage or constraints', () => {
Expand All @@ -72,5 +72,11 @@ describe('MetadataInfoComponent', () => {
fixture.nativeElement.querySelector('.md-description p')
expect(displayedElement).toBeTruthy()
})

it('should display the the metadata origin even if there is no lineage text', () => {
const displayedElement =
fixture.nativeElement.querySelector('.metadata-origin')
expect(displayedElement).toBeTruthy()
})
})
})

0 comments on commit 871172f

Please sign in to comment.