forked from hazza/dspace-angular
Autofix lint issues
This commit is contained in:
@@ -1,21 +1,30 @@
|
||||
/* eslint-disable no-empty, @typescript-eslint/no-empty-function */
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
NO_ERRORS_SCHEMA,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
ComponentFixture,
|
||||
inject,
|
||||
TestBed,
|
||||
waitForAsync,
|
||||
} from '@angular/core/testing';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { cold } from 'jasmine-marbles';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { createTestComponent } from '../../../shared/testing/utils.test';
|
||||
|
||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||
import {
|
||||
getMockNotificationsStateService,
|
||||
qualityAssuranceTopicObjectMoreAbstract,
|
||||
qualityAssuranceTopicObjectMorePid
|
||||
qualityAssuranceTopicObjectMorePid,
|
||||
} from '../../../shared/mocks/notifications.mock';
|
||||
import { QualityAssuranceTopicsComponent } from './quality-assurance-topics.component';
|
||||
import { NotificationsStateService } from '../../notifications-state.service';
|
||||
import { cold } from 'jasmine-marbles';
|
||||
import { PaginationServiceStub } from '../../../shared/testing/pagination-service.stub';
|
||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||
import { createTestComponent } from '../../../shared/testing/utils.test';
|
||||
import { NotificationsStateService } from '../../notifications-state.service';
|
||||
import { QualityAssuranceTopicsComponent } from './quality-assurance-topics.component';
|
||||
import { QualityAssuranceTopicsService } from './quality-assurance-topics.service';
|
||||
|
||||
describe('QualityAssuranceTopicsComponent test suite', () => {
|
||||
@@ -26,8 +35,8 @@ describe('QualityAssuranceTopicsComponent test suite', () => {
|
||||
const activatedRouteParams = {
|
||||
qualityAssuranceTopicsParams: {
|
||||
currentPage: 0,
|
||||
pageSize: 5
|
||||
}
|
||||
pageSize: 5,
|
||||
},
|
||||
};
|
||||
const paginationService = new PaginationServiceStub();
|
||||
|
||||
@@ -47,17 +56,17 @@ describe('QualityAssuranceTopicsComponent test suite', () => {
|
||||
paramMap: {
|
||||
get: () => 'openaire',
|
||||
},
|
||||
}}},
|
||||
} } },
|
||||
{ provide: PaginationService, useValue: paginationService },
|
||||
QualityAssuranceTopicsComponent,
|
||||
// tslint:disable-next-line: no-empty
|
||||
{ provide: QualityAssuranceTopicsService, useValue: { setSourceId: (sourceId: string) => { } }}
|
||||
{ provide: QualityAssuranceTopicsService, useValue: { setSourceId: (sourceId: string) => { } } },
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
}).compileComponents().then(() => {
|
||||
mockNotificationsStateService.getQualityAssuranceTopics.and.returnValue(observableOf([
|
||||
qualityAssuranceTopicObjectMorePid,
|
||||
qualityAssuranceTopicObjectMoreAbstract
|
||||
qualityAssuranceTopicObjectMoreAbstract,
|
||||
]));
|
||||
mockNotificationsStateService.getQualityAssuranceTopicsTotalPages.and.returnValue(observableOf(1));
|
||||
mockNotificationsStateService.getQualityAssuranceTopicsCurrentPage.and.returnValue(observableOf(0));
|
||||
@@ -111,11 +120,11 @@ describe('QualityAssuranceTopicsComponent test suite', () => {
|
||||
expect(comp.topics$).toBeObservable(cold('(a|)', {
|
||||
a: [
|
||||
qualityAssuranceTopicObjectMorePid,
|
||||
qualityAssuranceTopicObjectMoreAbstract
|
||||
]
|
||||
qualityAssuranceTopicObjectMoreAbstract,
|
||||
],
|
||||
}));
|
||||
expect(comp.totalElements$).toBeObservable(cold('(a|)', {
|
||||
a: 2
|
||||
a: 2,
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -130,13 +139,13 @@ describe('QualityAssuranceTopicsComponent test suite', () => {
|
||||
|
||||
it(('isTopicsLoading should return FALSE'), () => {
|
||||
expect(comp.isTopicsLoading()).toBeObservable(cold('(a|)', {
|
||||
a: false
|
||||
a: false,
|
||||
}));
|
||||
});
|
||||
|
||||
it(('isTopicsProcessing should return FALSE'), () => {
|
||||
expect(comp.isTopicsProcessing()).toBeObservable(cold('(a|)', {
|
||||
a: false
|
||||
a: false,
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -153,7 +162,7 @@ describe('QualityAssuranceTopicsComponent test suite', () => {
|
||||
// declare a test component
|
||||
@Component({
|
||||
selector: 'ds-test-cmp',
|
||||
template: ``
|
||||
template: ``,
|
||||
})
|
||||
class TestComponent {
|
||||
|
||||
|
Reference in New Issue
Block a user