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 @@