Skip to content

Commit 1d14d84

Browse files
alisaismailatisteph-ieffam
authored andcommitted
Merged in UXP-118 (pull request DSpace#1267)
[UXP-118] fix of displaying CMS header/footer/news section Approved-by: Stefano Maffei
2 parents c46d726 + a0cf660 commit 1d14d84

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

src/app/shared/explore/section-component/text-section/text-section.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div *ngSwitchCase="'image'"><img [src]="textRowSection.content" style="width: 100%"></div>
33
<div *ngSwitchCase="'text-key'">{{ ('explore.text-section.' + textRowSection.content) | translate }}</div>
44
<div *ngSwitchCase="'text-raw'">{{ textRowSection.content }}</div>
5-
<ds-markdown-viewer *ngSwitchCase="'text-metadata'" data-test="ds-markdown-viewer" [value]="metadataValue(textRowSection.content)"></ds-markdown-viewer>
5+
<div *ngSwitchCase="'text-metadata'" [innerHTML]="metadataValue(textRowSection.content)" [class.text-section-home-news]="textRowSection.content === 'cris.cms.home-news'"></div>
66
<div *ngSwitchCase="'custom'">
77
<ng-container *ngTemplateOutlet="custom"></ng-container>
88
</div>

src/app/shared/explore/section-component/text-section/text-section.component.spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { SearchService } from '../../../../core/shared/search/search.service';
22
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
33
import { TextSectionComponent } from './text-section.component';
44
import { Site } from '../../../../core/shared/site.model';
5-
import { By } from '@angular/platform-browser';
65
import { LocaleService } from '../../../../core/locale/locale.service';
76

87
describe('TextSectionComponent', () => {
@@ -62,10 +61,4 @@ describe('TextSectionComponent', () => {
6261
expect(component).toBeTruthy();
6362
});
6463
// FIXME: complete scenarios
65-
it('should render text-metadata with ds-markdown-viewer', () => {
66-
component.sectionId = 'site';
67-
fixture.detectChanges();
68-
const dsMarkdownViewer = fixture.debugElement.query(By.css('[data-test="ds-markdown-viewer"]'));
69-
expect(dsMarkdownViewer).toBeTruthy();
70-
});
7164
});

0 commit comments

Comments
 (0)