mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Clean up test.
This commit is contained in:
@@ -42,7 +42,7 @@ let fixture: ComponentFixture<EditBitstreamPageComponent>;
|
||||
|
||||
describe('EditBitstreamPageComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
beforeEach(() => {
|
||||
allFormats = [
|
||||
Object.assign({
|
||||
id: '1',
|
||||
@@ -73,13 +73,7 @@ describe('EditBitstreamPageComponent', () => {
|
||||
})
|
||||
] as BitstreamFormat[];
|
||||
selectedFormat = allFormats[1];
|
||||
notificationsService = jasmine.createSpyObj('notificationsService',
|
||||
{
|
||||
info: infoNotification,
|
||||
warning: warningNotification,
|
||||
success: successNotification
|
||||
}
|
||||
);
|
||||
|
||||
formService = Object.assign({
|
||||
createFormGroup: (fModel: DynamicFormControlModel[]) => {
|
||||
const controls = {};
|
||||
@@ -92,6 +86,24 @@ describe('EditBitstreamPageComponent', () => {
|
||||
return undefined;
|
||||
}
|
||||
});
|
||||
|
||||
bitstreamFormatService = jasmine.createSpyObj('bitstreamFormatService', {
|
||||
findAll: createSuccessfulRemoteDataObject$(createPaginatedList(allFormats))
|
||||
});
|
||||
|
||||
notificationsService = jasmine.createSpyObj('notificationsService',
|
||||
{
|
||||
info: infoNotification,
|
||||
warning: warningNotification,
|
||||
success: successNotification
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
describe('EditBitstreamPageComponent no IIIF fields', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
|
||||
bitstream = Object.assign(new Bitstream(), {
|
||||
metadata: {
|
||||
'dc.description': [
|
||||
@@ -252,18 +264,11 @@ describe('EditBitstreamPageComponent', () => {
|
||||
expect(router.navigate).toHaveBeenCalledWith([getEntityEditRoute(null, 'some-uuid'), 'bitstreams']);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('EditBitstreamPageComponent with IIIF', () => {
|
||||
describe('EditBitstreamPageComponent with IIIF fields', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
bitstreamService = jasmine.createSpyObj('bitstreamService', {
|
||||
findById: createSuccessfulRemoteDataObject$(bitstream),
|
||||
update: createSuccessfulRemoteDataObject$(bitstream),
|
||||
updateFormat: createSuccessfulRemoteDataObject$(bitstream),
|
||||
commitUpdates: {},
|
||||
patch: {}
|
||||
});
|
||||
bitstream = Object.assign(new Bitstream(), {
|
||||
metadata: {
|
||||
'dc.description': [
|
||||
@@ -381,4 +386,5 @@ describe('EditBitstreamPageComponent with IIIF', () => {
|
||||
expect(rawForm.iiifHeightContainer.iiifHeight).toEqual('2800');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user