diff --git a/apps/datahub/src/app/record/record-metadata/record-metadata.component.html b/apps/datahub/src/app/record/record-metadata/record-metadata.component.html index 51ecee9de..b26009bd5 100644 --- a/apps/datahub/src/app/record/record-metadata/record-metadata.component.html +++ b/apps/datahub/src/app/record/record-metadata/record-metadata.component.html @@ -44,8 +44,6 @@ [metadataQualityDisplay]="metadataQualityDisplay" > - - diff --git a/apps/datahub/src/app/record/record-metadata/record-metadata.component.spec.ts b/apps/datahub/src/app/record/record-metadata/record-metadata.component.spec.ts index 191219727..ef1b3929f 100644 --- a/apps/datahub/src/app/record/record-metadata/record-metadata.component.spec.ts +++ b/apps/datahub/src/app/record/record-metadata/record-metadata.component.spec.ts @@ -132,15 +132,6 @@ export class MockMetadataContactComponent { @Output() contactClick = new EventEmitter() } -@Component({ - // eslint-disable-next-line @angular-eslint/component-selector - selector: 'gn-ui-metadata-catalog', - template: '
', -}) -export class MockMetadataCatalogComponent { - @Input() sourceLabel: string -} - @Component({ // eslint-disable-next-line @angular-eslint/component-selector selector: 'gn-ui-record-api-form', @@ -179,7 +170,6 @@ describe('RecordMetadataComponent', () => { MockRelatedComponent, SearchResultsErrorComponent, MockMetadataInfoComponent, - MockMetadataCatalogComponent, MockMetadataContactComponent, MockRecordApiFormComponent, MockImgOverlayPreviewComponent, @@ -227,7 +217,6 @@ describe('RecordMetadataComponent', () => { describe('about', () => { let metadataInfo: MockMetadataInfoComponent let metadataContact: MockMetadataContactComponent - let catalogComponent: MockMetadataCatalogComponent beforeEach(() => { facade.isPresent$.next(true) @@ -238,9 +227,6 @@ describe('RecordMetadataComponent', () => { metadataContact = fixture.debugElement.query( By.directive(MockMetadataContactComponent) ).componentInstance - catalogComponent = fixture.debugElement.query( - By.directive(MockMetadataCatalogComponent) - ).componentInstance }) describe('if metadata present', () => { it('shows the full metadata', () => { @@ -249,12 +235,6 @@ describe('RecordMetadataComponent', () => { it('shows the metadata contact', () => { expect(metadataContact.metadata).toHaveProperty('contacts') }) - it('shows the metadata catalog', () => { - expect(sourcesService.getSourceLabel).toBeCalledWith( - SAMPLE_RECORD.extras.catalogUuid - ) - expect(catalogComponent.sourceLabel).toEqual('catalog label') - }) }) describe('if metadata not present', () => { beforeEach(() => { @@ -273,11 +253,6 @@ describe('RecordMetadataComponent', () => { fixture.debugElement.query(By.directive(MockMetadataContactComponent)) ).toBeFalsy() }) - it('does not display the metadata catalog component', () => { - expect( - fixture.debugElement.query(By.directive(MockMetadataCatalogComponent)) - ).toBeFalsy() - }) it('does not display the image overlay preview', () => { expect( fixture.debugElement.query( diff --git a/libs/ui/elements/src/index.ts b/libs/ui/elements/src/index.ts index 460ed5f89..bb14a17ed 100644 --- a/libs/ui/elements/src/index.ts +++ b/libs/ui/elements/src/index.ts @@ -1,7 +1,6 @@ export * from './lib/ui-elements.module' export * from './lib/metadata-info/metadata-info.component' export * from './lib/metadata-contact/metadata-contact.component' -export * from './lib/metadata-catalog/metadata-catalog.component' export * from './lib/metadata-quality/metadata-quality.component' export * from './lib/metadata-quality-item/metadata-quality-item.component' export * from './lib/search-results-error/search-results-error.component' diff --git a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.css b/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html b/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html deleted file mode 100644 index 66596e01d..000000000 --- a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
-

- record.metadata.catalog -

-

- {{ sourceLabel }} -

-
diff --git a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.spec.ts b/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.spec.ts deleted file mode 100644 index 975d690f3..000000000 --- a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.spec.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing' -import { By } from '@angular/platform-browser' - -import { MetadataCatalogComponent } from './metadata-catalog.component' - -describe('MetadataCatalogComponent', () => { - let component: MetadataCatalogComponent - let fixture: ComponentFixture - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [MetadataCatalogComponent], - }).compileComponents() - }) - - beforeEach(() => { - fixture = TestBed.createComponent(MetadataCatalogComponent) - component = fixture.componentInstance - component.sourceLabel = 'source label' - fixture.detectChanges() - }) - - it('should create', () => { - expect(component).toBeTruthy() - }) - - describe('content', () => { - let ps - beforeEach(() => { - ps = fixture.debugElement.queryAll(By.css('p')) - }) - it('displays the source label', () => { - expect(ps[1].nativeElement.innerHTML).toBe(' source label ') - }) - }) -}) diff --git a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.ts b/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.ts deleted file mode 100644 index b3e3ffdc3..000000000 --- a/libs/ui/elements/src/lib/metadata-catalog/metadata-catalog.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, ChangeDetectionStrategy, Input } from '@angular/core' - -@Component({ - selector: 'gn-ui-metadata-catalog', - templateUrl: './metadata-catalog.component.html', - styleUrls: ['./metadata-catalog.component.css'], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class MetadataCatalogComponent { - @Input() sourceLabel: string -} diff --git a/libs/ui/elements/src/lib/ui-elements.module.ts b/libs/ui/elements/src/lib/ui-elements.module.ts index 7a6feab03..5f8897a86 100644 --- a/libs/ui/elements/src/lib/ui-elements.module.ts +++ b/libs/ui/elements/src/lib/ui-elements.module.ts @@ -15,7 +15,6 @@ import { TranslateModule } from '@ngx-translate/core' import { LinkCardComponent } from './link-card/link-card.component' import { RelatedRecordCardComponent } from './related-record-card/related-record-card.component' import { MetadataContactComponent } from './metadata-contact/metadata-contact.component' -import { MetadataCatalogComponent } from './metadata-catalog/metadata-catalog.component' import { MetadataQualityComponent } from './metadata-quality/metadata-quality.component' import { MetadataQualityItemComponent } from './metadata-quality-item/metadata-quality-item.component' import { SearchResultsErrorComponent } from './search-results-error/search-results-error.component' @@ -56,7 +55,6 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over LinkCardComponent, RelatedRecordCardComponent, MetadataContactComponent, - MetadataCatalogComponent, MetadataQualityComponent, MetadataQualityItemComponent, SearchResultsErrorComponent, @@ -79,7 +77,6 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over LinkCardComponent, RelatedRecordCardComponent, MetadataContactComponent, - MetadataCatalogComponent, MetadataQualityComponent, MetadataQualityItemComponent, SearchResultsErrorComponent,