mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Fix tests
This commit is contained in:
@@ -415,7 +415,6 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
|
|||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private changeDetectorRef: ChangeDetectorRef,
|
private changeDetectorRef: ChangeDetectorRef,
|
||||||
private location: Location,
|
|
||||||
private formService: DynamicFormService,
|
private formService: DynamicFormService,
|
||||||
private translate: TranslateService,
|
private translate: TranslateService,
|
||||||
private bitstreamService: BitstreamDataService,
|
private bitstreamService: BitstreamDataService,
|
||||||
|
@@ -38,6 +38,8 @@ import { PaginationComponentOptions } from '../../shared/pagination/pagination-c
|
|||||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
||||||
import { ActivatedRouteStub } from '../../shared/testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../shared/testing/active-router.stub';
|
||||||
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
|
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
|
||||||
|
import { EnumKeysPipe } from '../../shared/utils/enum-keys-pipe';
|
||||||
|
import { VarDirective } from '../../shared/utils/var.directive';
|
||||||
import {
|
import {
|
||||||
BrowseByMetadataComponent,
|
BrowseByMetadataComponent,
|
||||||
browseParamsToOptions,
|
browseParamsToOptions,
|
||||||
|
@@ -7,6 +7,7 @@ import {
|
|||||||
TestBed,
|
TestBed,
|
||||||
waitForAsync,
|
waitForAsync,
|
||||||
} from '@angular/core/testing';
|
} from '@angular/core/testing';
|
||||||
|
import { By } from '@angular/platform-browser';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<!--
|
<!--
|
||||||
Choose a template. Priority: markdown, link, browse link.
|
Choose a template. Priority: markdown, link, browse link.
|
||||||
-->
|
-->
|
||||||
<ng-container *ngTemplateOutlet="(renderMarkdown ? markdown : (hasLink(mdValue) ? (img !== null ? linkImg : link) : (hasBrowseDefinition() ? browselink : simple)));
|
<ng-container *ngTemplateOutlet="(renderMarkdown ? markdown : (hasLink(mdValue) ? (hasValue(img) ? linkImg : link) : (hasBrowseDefinition() ? browselink : simple)));
|
||||||
context: {value: mdValue.value, img}">
|
context: {value: mdValue.value, img}">
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<span class="separator" *ngIf="!last" [innerHTML]="separator"></span>
|
<span class="separator" *ngIf="!last" [innerHTML]="separator"></span>
|
||||||
|
@@ -65,6 +65,7 @@ export class MetadataValuesComponent implements OnChanges {
|
|||||||
*/
|
*/
|
||||||
renderMarkdown;
|
renderMarkdown;
|
||||||
|
|
||||||
|
|
||||||
@Input() browseDefinition?: BrowseDefinition;
|
@Input() browseDefinition?: BrowseDefinition;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,6 +73,8 @@ export class MetadataValuesComponent implements OnChanges {
|
|||||||
*/
|
*/
|
||||||
@Input() img?: ImageField;
|
@Input() img?: ImageField;
|
||||||
|
|
||||||
|
hasValue = hasValue;
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
this.renderMarkdown = !!this.appConfig.markdown.enabled && this.enableMarkdown;
|
this.renderMarkdown = !!this.appConfig.markdown.enabled && this.enableMarkdown;
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,7 @@ import {
|
|||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
UntypedFormGroup,
|
UntypedFormGroup,
|
||||||
} from '@angular/forms';
|
} from '@angular/forms';
|
||||||
|
import { By } from '@angular/platform-browser';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import {
|
import {
|
||||||
DynamicFormsCoreModule,
|
DynamicFormsCoreModule,
|
||||||
|
Reference in New Issue
Block a user