diff --git a/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts b/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts index a81901b0ffe..390885e89f7 100644 --- a/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts +++ b/src/app/handle-page/new-handle-page/new-handle-page.component.spec.ts @@ -1,4 +1,4 @@ -import {ComponentFixture, fakeAsync, TestBed} from '@angular/core/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; import { NewHandlePageComponent } from './new-handle-page.component'; import { NotificationsServiceStub } from '../../shared/testing/notifications-service.stub'; import { of as observableOf } from 'rxjs'; @@ -7,12 +7,13 @@ import { CommonModule } from '@angular/common'; import { ReactiveFormsModule } from '@angular/forms'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { RouterTestingModule } from '@angular/router/testing'; -import { RequestService } from '../../core/data/request.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { getMockTranslateService } from '../../shared/mocks/translate.service.mock'; import { Store } from '@ngrx/store'; import { HandleDataService } from '../../core/data/handle-data.service'; import { mockCreatedHandleRD$ } from '../../shared/mocks/handle-mock'; +import { PaginationService } from '../../core/pagination/pagination.service'; +import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub'; /** * The test class for the NewHandlePageComponent. @@ -23,6 +24,7 @@ describe('NewHandlePageComponent', () => { let notificationService: NotificationsServiceStub; let handleDataService: HandleDataService; + let paginationService: PaginationServiceStub; const successfulResponse = { response: { @@ -31,6 +33,7 @@ describe('NewHandlePageComponent', () => { beforeEach(async () => { notificationService = new NotificationsServiceStub(); + paginationService = new PaginationServiceStub(); handleDataService = jasmine.createSpyObj('handleDataService', { create: mockCreatedHandleRD$, @@ -49,6 +52,8 @@ describe('NewHandlePageComponent', () => { providers: [ { provide: NotificationsService, useValue: notificationService }, { provide: HandleDataService, useValue: handleDataService }, + { provide: PaginationService, useValue: paginationService }, + { provide: TranslateService, useValue: getMockTranslateService() }, { provide: Store, useValue: { // tslint:disable-next-line:no-empty @@ -77,12 +82,12 @@ describe('NewHandlePageComponent', () => { }); // TODO fix this failing test later. It fails in the Github but locally it works. - // it('should notify after successful request', () => { + // it('should notify after successful request',waitForAsync(() => { // component.onClickSubmit('new handle'); // // fixture.whenStable().then(() => { // expect((component as any).notificationsService.success).toHaveBeenCalled(); // expect((component as any).notificationsService.error).not.toHaveBeenCalled(); // }); - // }); + // })); }); diff --git a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html index b38709fbfbd..2da6b9a1c74 100644 --- a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html +++ b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html @@ -28,12 +28,15 @@
- +
+ {{licenseType }}
- +
+
+
diff --git a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.scss b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.scss index 6ad19d35700..b3c03e445a9 100644 --- a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.scss +++ b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.scss @@ -46,6 +46,8 @@ color: #fff; border-radius: 0 0.25em 0.25em 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + border: 1px solid #ddd; + border-bottom: none; } .label-icon { @@ -53,15 +55,18 @@ } .label-PUB { - background-color: #5cb811; + background-color: #dff0d8 !important; + color: #5cb811 !important;; } .label-RES { - background-color: #c62d1f; + color: #c62d1f !important; + background-color: #f2dede !important; } .label-ACA, .label-PDT { - background-color: #ffab23; + color: #ffab23 !important; + background-color: #fcf8e3 !important; } .label-license { diff --git a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts index a7befd62964..6908634edc1 100644 --- a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts +++ b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts @@ -203,7 +203,8 @@ export class ClarinItemBoxViewComponent implements OnInit { clarinLicense.extendedClarinLicenseLabels.forEach(extendedCll => { this.licenseLabelIcons.push(extendedCll?.icon); }); - this.licenseLabelIcons.push(clarinLicense?.clarinLicenseLabel?.icon); + // For now show only extended CLL icons + // this.licenseLabelIcons.push(clarinLicense?.clarinLicenseLabel?.icon); }); }