mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
[DSC-516] Test cases changes
This commit is contained in:
@@ -18,6 +18,7 @@ import { ItemAdminSearchResultGridElementComponent } from './item-admin-search-r
|
|||||||
import { createSuccessfulRemoteDataObject$ } from '../../../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../../../../shared/remote-data.utils';
|
||||||
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
import { getMockThemeService } from '../../../../../shared/mocks/theme-service.mock';
|
||||||
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
import { ThemeService } from '../../../../../shared/theme-support/theme.service';
|
||||||
|
import { NativeWindowRef, NativeWindowService } from '../../../../../core/services/window.service';
|
||||||
|
|
||||||
describe('ItemAdminSearchResultGridElementComponent', () => {
|
describe('ItemAdminSearchResultGridElementComponent', () => {
|
||||||
let component: ItemAdminSearchResultGridElementComponent;
|
let component: ItemAdminSearchResultGridElementComponent;
|
||||||
@@ -52,6 +53,7 @@ describe('ItemAdminSearchResultGridElementComponent', () => {
|
|||||||
SharedModule
|
SharedModule
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
{ provide: NativeWindowService, useValue: new NativeWindowRef() },
|
||||||
{ provide: TruncatableService, useValue: mockTruncatableService },
|
{ provide: TruncatableService, useValue: mockTruncatableService },
|
||||||
{ provide: BitstreamDataService, useValue: mockBitstreamDataService },
|
{ provide: BitstreamDataService, useValue: mockBitstreamDataService },
|
||||||
{ provide: ThemeService, useValue: mockThemeService },
|
{ provide: ThemeService, useValue: mockThemeService },
|
||||||
|
@@ -9,6 +9,7 @@ import { getMockTranslateService } from '../../mocks/translate.service.mock';
|
|||||||
import { TranslateLoaderMock } from '../../mocks/translate-loader.mock';
|
import { TranslateLoaderMock } from '../../mocks/translate-loader.mock';
|
||||||
import { mockTruncatableService } from '../../mocks/mock-trucatable.service';
|
import { mockTruncatableService } from '../../mocks/mock-trucatable.service';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
|
import { NativeWindowRef, NativeWindowService } from '../../../core/services/window.service';
|
||||||
|
|
||||||
describe('TruncatablePartComponent', () => {
|
describe('TruncatablePartComponent', () => {
|
||||||
let comp: TruncatablePartComponent;
|
let comp: TruncatablePartComponent;
|
||||||
@@ -29,7 +30,7 @@ describe('TruncatablePartComponent', () => {
|
|||||||
};
|
};
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
translateService = getMockTranslateService();
|
translateService = getMockTranslateService();
|
||||||
TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
imports: [NoopAnimationsModule,
|
imports: [NoopAnimationsModule,
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
loader: {
|
loader: {
|
||||||
@@ -40,6 +41,7 @@ describe('TruncatablePartComponent', () => {
|
|||||||
],
|
],
|
||||||
declarations: [TruncatablePartComponent],
|
declarations: [TruncatablePartComponent],
|
||||||
providers: [
|
providers: [
|
||||||
|
{ provide: NativeWindowService, useValue: new NativeWindowRef() },
|
||||||
{ provide: TruncatableService, useValue: truncatableServiceStub },
|
{ provide: TruncatableService, useValue: truncatableServiceStub },
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
@@ -110,7 +112,7 @@ describe('TruncatablePartComponent', () => {
|
|||||||
let truncatableService;
|
let truncatableService;
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
translateService = getMockTranslateService();
|
translateService = getMockTranslateService();
|
||||||
TestBed.configureTestingModule({
|
void TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
NoopAnimationsModule,
|
NoopAnimationsModule,
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
@@ -122,6 +124,7 @@ describe('TruncatablePartComponent', () => {
|
|||||||
],
|
],
|
||||||
declarations: [TruncatablePartComponent],
|
declarations: [TruncatablePartComponent],
|
||||||
providers: [
|
providers: [
|
||||||
|
{ provide: NativeWindowService, useValue: new NativeWindowRef() },
|
||||||
{ provide: TruncatableService, useValue: mockTruncatableService },
|
{ provide: TruncatableService, useValue: mockTruncatableService },
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
|
@@ -2,7 +2,7 @@ import { Component, Inject, Input, OnDestroy, OnInit, PLATFORM_ID } from '@angul
|
|||||||
import { TruncatableService } from '../truncatable.service';
|
import { TruncatableService } from '../truncatable.service';
|
||||||
import { hasValue } from '../../empty.util';
|
import { hasValue } from '../../empty.util';
|
||||||
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
||||||
import { NativeWindowRef, NativeWindowService } from 'src/app/core/services/window.service';
|
import { NativeWindowRef, NativeWindowService } from '../../../core/services/window.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-truncatable-part',
|
selector: 'ds-truncatable-part',
|
||||||
|
Reference in New Issue
Block a user