mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Updated test.
This commit is contained in:
@@ -25,13 +25,10 @@ function getItem(metadata: MetadataMap) {
|
|||||||
const noMetadata = new MetadataMap();
|
const noMetadata = new MetadataMap();
|
||||||
|
|
||||||
const mockHostWindowService = {
|
const mockHostWindowService = {
|
||||||
|
// This isn't really testing mobile status, the return observable just allows the test to run.
|
||||||
widthCategory: observableOf(true),
|
widthCategory: observableOf(true),
|
||||||
};
|
};
|
||||||
|
|
||||||
const mockHostWindowServiceMobile = {
|
|
||||||
widthCategory: observableOf(false),
|
|
||||||
};
|
|
||||||
|
|
||||||
describe('MiradorViewerComponent with search', () => {
|
describe('MiradorViewerComponent with search', () => {
|
||||||
let comp: MiradorViewerComponent;
|
let comp: MiradorViewerComponent;
|
||||||
let fixture: ComponentFixture<MiradorViewerComponent>;
|
let fixture: ComponentFixture<MiradorViewerComponent>;
|
||||||
@@ -152,7 +149,7 @@ describe('MiradorViewerComponent with multiple images', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
describe('MiradorViewerComponent with a single image in mobile configuration', () => {
|
describe('MiradorViewerComponent with a single image', () => {
|
||||||
let comp: MiradorViewerComponent;
|
let comp: MiradorViewerComponent;
|
||||||
let fixture: ComponentFixture<MiradorViewerComponent>;
|
let fixture: ComponentFixture<MiradorViewerComponent>;
|
||||||
const viewerService = jasmine.createSpyObj('MiradorViewerService', ['showEmbeddedViewer', 'getImageCount']);
|
const viewerService = jasmine.createSpyObj('MiradorViewerService', ['showEmbeddedViewer', 'getImageCount']);
|
||||||
@@ -170,7 +167,7 @@ describe('MiradorViewerComponent with a single image in mobile configuration', (
|
|||||||
declarations: [MiradorViewerComponent],
|
declarations: [MiradorViewerComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: BitstreamDataService, useValue: {} },
|
{ provide: BitstreamDataService, useValue: {} },
|
||||||
{ provide: HostWindowService, useValue: mockHostWindowServiceMobile }
|
{ provide: HostWindowService, useValue: mockHostWindowService }
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
}).overrideComponent(MiradorViewerComponent, {
|
}).overrideComponent(MiradorViewerComponent, {
|
||||||
@@ -200,10 +197,6 @@ describe('MiradorViewerComponent with a single image in mobile configuration', (
|
|||||||
expect(viewerService.getImageCount).toHaveBeenCalled();
|
expect(viewerService.getImageCount).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be in mobile configuration', () => {
|
|
||||||
expect(comp.notMobile).toBeFalse();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user