mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fix Test errors, hide COAR requests with no LDN associable
This commit is contained in:
@@ -3,12 +3,16 @@ import { TestBed } from '@angular/core/testing';
|
|||||||
import { NotifyInfoService } from './notify-info.service';
|
import { NotifyInfoService } from './notify-info.service';
|
||||||
import { ConfigurationDataService } from '../../data/configuration-data.service';
|
import { ConfigurationDataService } from '../../data/configuration-data.service';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
|
import { AuthorizationDataService } from '../../data/feature-authorization/authorization-data.service';
|
||||||
|
|
||||||
describe('NotifyInfoService', () => {
|
describe('NotifyInfoService', () => {
|
||||||
let service: NotifyInfoService;
|
let service: NotifyInfoService;
|
||||||
let configurationDataService: any;
|
let configurationDataService: any;
|
||||||
|
let authorizationDataService: any;
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
authorizationDataService = {
|
||||||
|
isAuthorized: jasmine.createSpy('isAuthorized').and.returnValue(of(true)),
|
||||||
|
};
|
||||||
configurationDataService = {
|
configurationDataService = {
|
||||||
findByPropertyName: jasmine.createSpy('findByPropertyName').and.returnValue(of({})),
|
findByPropertyName: jasmine.createSpy('findByPropertyName').and.returnValue(of({})),
|
||||||
};
|
};
|
||||||
@@ -16,9 +20,11 @@ describe('NotifyInfoService', () => {
|
|||||||
providers: [
|
providers: [
|
||||||
NotifyInfoService,
|
NotifyInfoService,
|
||||||
{ provide: ConfigurationDataService, useValue: configurationDataService },
|
{ provide: ConfigurationDataService, useValue: configurationDataService },
|
||||||
|
{ provide: AuthorizationDataService, useValue: authorizationDataService }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(NotifyInfoService);
|
service = TestBed.inject(NotifyInfoService);
|
||||||
|
authorizationDataService = TestBed.inject(AuthorizationDataService);
|
||||||
configurationDataService = TestBed.inject(ConfigurationDataService);
|
configurationDataService = TestBed.inject(ConfigurationDataService);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<ng-container *ngIf="patterns?.length > 0 ">
|
<ng-container *ngIf="patterns?.length > 0 ">
|
||||||
<div *ngFor="let ldnPattern of patterns; let i = index" class="col">
|
<div *ngFor="let ldnPattern of patterns; let i = index" class="col">
|
||||||
|
<div *ngIf="(filterServices(ldnPattern.pattern ) | async)?.length > 0">
|
||||||
<label class="row col-form-label"
|
<label class="row col-form-label"
|
||||||
>
|
>
|
||||||
{{'submission.section.section-coar-notify.control.' + ldnPattern.pattern + '.label' | translate }}
|
{{'submission.section.section-coar-notify.control.' + ldnPattern.pattern + '.label' | translate }}
|
||||||
@@ -138,6 +139,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="patterns?.length === 0">
|
<ng-container *ngIf="patterns?.length === 0">
|
||||||
<p>
|
<p>
|
||||||
|
Reference in New Issue
Block a user