From 5911a4f1106a39354f77c8b658027b66f4be2fa9 Mon Sep 17 00:00:00 2001 From: Renaud Michotte Date: Thu, 7 Apr 2022 13:48:17 +0200 Subject: [PATCH] holdings: allow new line for `enumerationAndChronology` field Closes rero/rero-ils#2822. Co-authored-by: Renaud Michotte --- .../holding-shared-view.component.html | 5 +- .../holding-shared-view.component.spec.ts | 71 ------------------- .../holdings/holding/holding.component.html | 5 +- 3 files changed, 7 insertions(+), 74 deletions(-) delete mode 100644 projects/admin/src/app/record/detail-view/document-detail-view/holding-shared-view/holding-shared-view.component.spec.ts diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holding-shared-view/holding-shared-view.component.html b/projects/admin/src/app/record/detail-view/document-detail-view/holding-shared-view/holding-shared-view.component.html index 5777d6757..845034612 100644 --- a/projects/admin/src/app/record/detail-view/document-detail-view/holding-shared-view/holding-shared-view.component.html +++ b/projects/admin/src/app/record/detail-view/document-detail-view/holding-shared-view/holding-shared-view.component.html @@ -38,8 +38,9 @@
Available collection
-
- {{ holding.metadata.enumerationAndChronology }} +
diff --git a/projects/admin/src/app/record/detail-view/document-detail-view/holding-shared-view/holding-shared-view.component.spec.ts b/projects/admin/src/app/record/detail-view/document-detail-view/holding-shared-view/holding-shared-view.component.spec.ts deleted file mode 100644 index d136e3e3c..000000000 --- a/projects/admin/src/app/record/detail-view/document-detail-view/holding-shared-view/holding-shared-view.component.spec.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * RERO ILS UI - * Copyright (C) 2021 RERO - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, version 3 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { HoldingSharedViewComponent } from './holding-shared-view.component'; - -describe('HoldingSharedViewComponent', () => { - let component: HoldingSharedViewComponent; - let fixture: ComponentFixture; - - const record = { - metadata: { - pid: 1, - call_number: 'A11111', - enumerationAndChronology: 'enum', - supplementaryContent: 'supp', - index: 'index field' - } - }; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ HoldingSharedViewComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(HoldingSharedViewComponent); - component = fixture.componentInstance; - component.holding = record; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); - - it('should display the call number field', () => { - const data = fixture.nativeElement.querySelector('#holding-call-number-1'); - expect(data.textContent).toContain('A11111'); - }); - - it('should display the enumeration and chronology field', () => { - const data = fixture.nativeElement.querySelector('#holding-enum-chrono-1'); - expect(data.textContent).toContain('enum'); - }); - - it('should display the enumeration and chronology field', () => { - const data = fixture.nativeElement.querySelector('#holding-sup-content-1'); - expect(data.textContent).toContain('supp'); - }); - - it('should display the index field', () => { - const data = fixture.nativeElement.querySelector('#holding-index-1'); - expect(data.textContent).toContain('index field'); - }); -}); diff --git a/projects/public-search/src/app/document-detail/holdings/holding/holding.component.html b/projects/public-search/src/app/document-detail/holdings/holding/holding.component.html index 7152e42d7..e158b5d41 100644 --- a/projects/public-search/src/app/document-detail/holdings/holding/holding.component.html +++ b/projects/public-search/src/app/document-detail/holdings/holding/holding.component.html @@ -77,7 +77,10 @@
Available collection
-
{{ holding.metadata.enumerationAndChronology }}
+
+