From 9dce3ccb98a6715d2d7e391cc7ee872492811efb Mon Sep 17 00:00:00 2001 From: Angelika Kinas Date: Tue, 7 Nov 2023 15:45:50 +0100 Subject: [PATCH 1/2] fix(libs): Show metadata origin --- .../src/lib/metadata-info/metadata-info.component.html | 8 +++++++- .../src/lib/metadata-info/metadata-info.component.spec.ts | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html index ee2d778187..51fd5e1214 100644 --- a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +++ b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html @@ -30,7 +30,13 @@

diff --git a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.spec.ts b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.spec.ts index eaba09c8d0..96116d4180 100644 --- a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.spec.ts +++ b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.spec.ts @@ -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', () => { @@ -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() + }) }) }) From f4a787c309036bc80e9d22fa550be0602d54cc05 Mon Sep 17 00:00:00 2001 From: Angelika Kinas Date: Wed, 8 Nov 2023 09:17:40 +0100 Subject: [PATCH 2/2] feat(libs): Make paragraph for lineage conditional --- .../src/lib/metadata-info/metadata-info.component.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html index 51fd5e1214..2940b3c0ca 100644 --- a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +++ b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html @@ -39,7 +39,11 @@ " [title]="'record.metadata.origin' | translate" > -

+

{{ metadata.lineage }}