mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +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 { ConfigurationDataService } from '../../data/configuration-data.service';
|
||||
import { of } from 'rxjs';
|
||||
import { AuthorizationDataService } from '../../data/feature-authorization/authorization-data.service';
|
||||
|
||||
describe('NotifyInfoService', () => {
|
||||
let service: NotifyInfoService;
|
||||
let configurationDataService: any;
|
||||
|
||||
let authorizationDataService: any;
|
||||
beforeEach(() => {
|
||||
authorizationDataService = {
|
||||
isAuthorized: jasmine.createSpy('isAuthorized').and.returnValue(of(true)),
|
||||
};
|
||||
configurationDataService = {
|
||||
findByPropertyName: jasmine.createSpy('findByPropertyName').and.returnValue(of({})),
|
||||
};
|
||||
@@ -16,9 +20,11 @@ describe('NotifyInfoService', () => {
|
||||
providers: [
|
||||
NotifyInfoService,
|
||||
{ provide: ConfigurationDataService, useValue: configurationDataService },
|
||||
{ provide: AuthorizationDataService, useValue: authorizationDataService }
|
||||
]
|
||||
});
|
||||
service = TestBed.inject(NotifyInfoService);
|
||||
authorizationDataService = TestBed.inject(AuthorizationDataService);
|
||||
configurationDataService = TestBed.inject(ConfigurationDataService);
|
||||
});
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<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 *ngIf="(filterServices(ldnPattern.pattern ) | async)?.length > 0">
|
||||
<label class="row col-form-label"
|
||||
>
|
||||
{{'submission.section.section-coar-notify.control.' + ldnPattern.pattern + '.label' | translate }}
|
||||
@@ -138,6 +139,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="patterns?.length === 0">
|
||||
<p>
|
||||
|
Reference in New Issue
Block a user