mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 14:03:06 +00:00
solved bug where equal objects were't compared by their properties
This commit is contained in:
@@ -57,23 +57,24 @@ describe('RegistryService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const mockSchemasList = [
|
const mockSchemasList = [
|
||||||
{
|
|
||||||
|
Object.assign(new MetadataSchema(), {
|
||||||
id: 1,
|
id: 1,
|
||||||
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadataschemas/1',
|
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadataschemas/1',
|
||||||
prefix: 'dc',
|
prefix: 'dc',
|
||||||
namespace: 'http://dublincore.org/documents/dcmi-terms/',
|
namespace: 'http://dublincore.org/documents/dcmi-terms/',
|
||||||
type: MetadataSchema.type
|
type: MetadataSchema.type
|
||||||
},
|
}),
|
||||||
{
|
Object.assign(new MetadataSchema(), {
|
||||||
id: 2,
|
id: 2,
|
||||||
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadataschemas/2',
|
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadataschemas/2',
|
||||||
prefix: 'mock',
|
prefix: 'mock',
|
||||||
namespace: 'http://dspace.org/mockschema',
|
namespace: 'http://dspace.org/mockschema',
|
||||||
type: MetadataSchema.type
|
type: MetadataSchema.type
|
||||||
}
|
})
|
||||||
];
|
];
|
||||||
const mockFieldsList = [
|
const mockFieldsList = [
|
||||||
{
|
Object.assign(new MetadataField(), {
|
||||||
id: 1,
|
id: 1,
|
||||||
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadatafields/8',
|
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadatafields/8',
|
||||||
element: 'contributor',
|
element: 'contributor',
|
||||||
@@ -81,8 +82,8 @@ describe('RegistryService', () => {
|
|||||||
scopeNote: null,
|
scopeNote: null,
|
||||||
schema: mockSchemasList[0],
|
schema: mockSchemasList[0],
|
||||||
type: MetadataField.type
|
type: MetadataField.type
|
||||||
},
|
}),
|
||||||
{
|
Object.assign(new MetadataField(), {
|
||||||
id: 2,
|
id: 2,
|
||||||
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadatafields/9',
|
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadatafields/9',
|
||||||
element: 'contributor',
|
element: 'contributor',
|
||||||
@@ -90,8 +91,8 @@ describe('RegistryService', () => {
|
|||||||
scopeNote: null,
|
scopeNote: null,
|
||||||
schema: mockSchemasList[0],
|
schema: mockSchemasList[0],
|
||||||
type: MetadataField.type
|
type: MetadataField.type
|
||||||
},
|
}),
|
||||||
{
|
Object.assign(new MetadataField(), {
|
||||||
id: 3,
|
id: 3,
|
||||||
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadatafields/10',
|
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadatafields/10',
|
||||||
element: 'contributor',
|
element: 'contributor',
|
||||||
@@ -99,8 +100,8 @@ describe('RegistryService', () => {
|
|||||||
scopeNote: 'test scope note',
|
scopeNote: 'test scope note',
|
||||||
schema: mockSchemasList[1],
|
schema: mockSchemasList[1],
|
||||||
type: MetadataField.type
|
type: MetadataField.type
|
||||||
},
|
}),
|
||||||
{
|
Object.assign(new MetadataField(), {
|
||||||
id: 4,
|
id: 4,
|
||||||
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadatafields/11',
|
self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadatafields/11',
|
||||||
element: 'contributor',
|
element: 'contributor',
|
||||||
@@ -108,7 +109,7 @@ describe('RegistryService', () => {
|
|||||||
scopeNote: null,
|
scopeNote: null,
|
||||||
schema: mockSchemasList[1],
|
schema: mockSchemasList[1],
|
||||||
type: MetadataField.type
|
type: MetadataField.type
|
||||||
}
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
const pageInfo = new PageInfo();
|
const pageInfo = new PageInfo();
|
||||||
|
@@ -19,6 +19,9 @@ function equalsByFields(object1, object2, fieldList): boolean {
|
|||||||
if (object1[key] instanceof EquatableObject) {
|
if (object1[key] instanceof EquatableObject) {
|
||||||
return !object1[key].equals(object2[key]);
|
return !object1[key].equals(object2[key]);
|
||||||
}
|
}
|
||||||
|
if (typeof object1[key] === 'object') {
|
||||||
|
equalsByFields(object1[key], object2[key], Object.keys(object1))
|
||||||
|
}
|
||||||
return object1[key] !== object2[key];
|
return object1[key] !== object2[key];
|
||||||
});
|
});
|
||||||
return hasNoValue(unequalProperty);
|
return hasNoValue(unequalProperty);
|
||||||
|
@@ -27,6 +27,8 @@ import { AuthorityConfidenceStateDirective } from '../../../../../authority-conf
|
|||||||
import { ObjNgFor } from '../../../../../utils/object-ngfor.pipe';
|
import { ObjNgFor } from '../../../../../utils/object-ngfor.pipe';
|
||||||
import { GLOBAL_CONFIG, GlobalConfig } from '../../../../../../../config';
|
import { GLOBAL_CONFIG, GlobalConfig } from '../../../../../../../config';
|
||||||
import { MOCK_SUBMISSION_CONFIG } from '../../../../../testing/mock-submission-config';
|
import { MOCK_SUBMISSION_CONFIG } from '../../../../../testing/mock-submission-config';
|
||||||
|
import { WorkspaceitemsEditPageModule } from '../../../../../../+workspaceitems-edit-page/workspaceitems-edit-page.module';
|
||||||
|
import { WorkspaceItem } from '../../../../../../core/submission/models/workspaceitem.model';
|
||||||
|
|
||||||
let LOOKUP_TEST_MODEL_CONFIG = {
|
let LOOKUP_TEST_MODEL_CONFIG = {
|
||||||
authorityOptions: {
|
authorityOptions: {
|
||||||
@@ -47,7 +49,8 @@ let LOOKUP_TEST_MODEL_CONFIG = {
|
|||||||
repeatable: true,
|
repeatable: true,
|
||||||
separator: ',',
|
separator: ',',
|
||||||
validators: { required: null },
|
validators: { required: null },
|
||||||
value: undefined
|
value: undefined,
|
||||||
|
workspaceItem: new WorkspaceItem()
|
||||||
};
|
};
|
||||||
|
|
||||||
let LOOKUP_NAME_TEST_MODEL_CONFIG = {
|
let LOOKUP_NAME_TEST_MODEL_CONFIG = {
|
||||||
@@ -69,7 +72,8 @@ let LOOKUP_NAME_TEST_MODEL_CONFIG = {
|
|||||||
repeatable: true,
|
repeatable: true,
|
||||||
separator: ',',
|
separator: ',',
|
||||||
validators: { required: null },
|
validators: { required: null },
|
||||||
value: undefined
|
value: undefined,
|
||||||
|
workspaceItem: new WorkspaceItem()
|
||||||
};
|
};
|
||||||
|
|
||||||
let LOOKUP_TEST_GROUP = new FormGroup({
|
let LOOKUP_TEST_GROUP = new FormGroup({
|
||||||
@@ -100,7 +104,8 @@ describe('Dynamic Lookup component', () => {
|
|||||||
repeatable: true,
|
repeatable: true,
|
||||||
separator: ',',
|
separator: ',',
|
||||||
validators: { required: null },
|
validators: { required: null },
|
||||||
value: undefined
|
value: undefined,
|
||||||
|
workspaceItem: new WorkspaceItem()
|
||||||
};
|
};
|
||||||
|
|
||||||
LOOKUP_NAME_TEST_MODEL_CONFIG = {
|
LOOKUP_NAME_TEST_MODEL_CONFIG = {
|
||||||
@@ -122,7 +127,8 @@ describe('Dynamic Lookup component', () => {
|
|||||||
repeatable: true,
|
repeatable: true,
|
||||||
separator: ',',
|
separator: ',',
|
||||||
validators: { required: null },
|
validators: { required: null },
|
||||||
value: undefined
|
value: undefined,
|
||||||
|
workspaceItem: new WorkspaceItem()
|
||||||
};
|
};
|
||||||
|
|
||||||
LOOKUP_TEST_GROUP = new FormGroup({
|
LOOKUP_TEST_GROUP = new FormGroup({
|
||||||
|
@@ -26,6 +26,7 @@ import { MOCK_SUBMISSION_CONFIG } from '../../../../../testing/mock-submission-c
|
|||||||
import { Store, StoreModule } from '@ngrx/store';
|
import { Store, StoreModule } from '@ngrx/store';
|
||||||
import { MockStore } from '../../../../../testing/mock-store';
|
import { MockStore } from '../../../../../testing/mock-store';
|
||||||
import { FormRowModel } from '../../../../../../core/config/models/config-submission-form.model';
|
import { FormRowModel } from '../../../../../../core/config/models/config-submission-form.model';
|
||||||
|
import { WorkspaceItem } from '../../../../../../core/submission/models/workspaceitem.model';
|
||||||
|
|
||||||
export let FORM_GROUP_TEST_MODEL_CONFIG;
|
export let FORM_GROUP_TEST_MODEL_CONFIG;
|
||||||
|
|
||||||
@@ -77,7 +78,9 @@ function init() {
|
|||||||
required: true,
|
required: true,
|
||||||
scopeUUID: '43fe1f8c-09a6-4fcf-9c78-5d4fed8f2c8f',
|
scopeUUID: '43fe1f8c-09a6-4fcf-9c78-5d4fed8f2c8f',
|
||||||
submissionScope: undefined,
|
submissionScope: undefined,
|
||||||
validators: { required: null }
|
validators: { required: null },
|
||||||
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
repeatable: false
|
||||||
} as DynamicRelationGroupModelConfig;
|
} as DynamicRelationGroupModelConfig;
|
||||||
|
|
||||||
FORM_GROUP_TEST_GROUP = new FormGroup({
|
FORM_GROUP_TEST_GROUP = new FormGroup({
|
||||||
@@ -183,7 +186,7 @@ describe('DsDynamicRelationGroupComponent test suite', () => {
|
|||||||
|
|
||||||
it('should init component properly', inject([FormBuilderService], (service: FormBuilderService) => {
|
it('should init component properly', inject([FormBuilderService], (service: FormBuilderService) => {
|
||||||
const formConfig = { rows: groupComp.model.formConfiguration } as SubmissionFormsModel;
|
const formConfig = { rows: groupComp.model.formConfiguration } as SubmissionFormsModel;
|
||||||
const formModel = service.modelFromConfiguration(formConfig, groupComp.model.scopeUUID, {}, groupComp.model.submissionScope, groupComp.model.readOnly);
|
const formModel = service.modelFromConfiguration(formConfig, groupComp.model.scopeUUID, {}, new WorkspaceItem(), groupComp.model.submissionScope, groupComp.model.readOnly);
|
||||||
const chips = new Chips([], 'value', 'dc.contributor.author');
|
const chips = new Chips([], 'value', 'dc.contributor.author');
|
||||||
groupComp.formCollapsed.subscribe((value) => {
|
groupComp.formCollapsed.subscribe((value) => {
|
||||||
expect(value).toEqual(false);
|
expect(value).toEqual(false);
|
||||||
@@ -257,11 +260,11 @@ describe('DsDynamicRelationGroupComponent test suite', () => {
|
|||||||
|
|
||||||
it('should init component properly', inject([FormBuilderService], (service: FormBuilderService) => {
|
it('should init component properly', inject([FormBuilderService], (service: FormBuilderService) => {
|
||||||
const formConfig = { rows: groupComp.model.formConfiguration } as SubmissionFormsModel;
|
const formConfig = { rows: groupComp.model.formConfiguration } as SubmissionFormsModel;
|
||||||
const formModel = service.modelFromConfiguration(formConfig, groupComp.model.scopeUUID, {}, groupComp.model.submissionScope, groupComp.model.readOnly);
|
const formModel = service.modelFromConfiguration(formConfig, groupComp.model.scopeUUID, {}, new WorkspaceItem(), groupComp.model.submissionScope, groupComp.model.readOnly);
|
||||||
const chips = new Chips(modelValue, 'value', 'dc.contributor.author');
|
const chips = new Chips(modelValue, 'value', 'dc.contributor.author');
|
||||||
groupComp.formCollapsed.subscribe((value) => {
|
groupComp.formCollapsed.subscribe((value) => {
|
||||||
expect(value).toEqual(true);
|
expect(value).toEqual(true);
|
||||||
})
|
});
|
||||||
expect(groupComp.formModel.length).toEqual(formModel.length);
|
expect(groupComp.formModel.length).toEqual(formModel.length);
|
||||||
expect(groupComp.chips.getChipsItems()).toEqual(chips.getChipsItems());
|
expect(groupComp.chips.getChipsItems()).toEqual(chips.getChipsItems());
|
||||||
}));
|
}));
|
||||||
|
@@ -16,6 +16,7 @@ import { DsDynamicScrollableDropdownComponent } from './dynamic-scrollable-dropd
|
|||||||
import { DynamicScrollableDropdownModel } from './dynamic-scrollable-dropdown.model';
|
import { DynamicScrollableDropdownModel } from './dynamic-scrollable-dropdown.model';
|
||||||
import { AuthorityValue } from '../../../../../../core/integration/models/authority.value';
|
import { AuthorityValue } from '../../../../../../core/integration/models/authority.value';
|
||||||
import { createTestComponent, hasClass } from '../../../../../testing/utils';
|
import { createTestComponent, hasClass } from '../../../../../testing/utils';
|
||||||
|
import { WorkspaceItem } from '../../../../../../core/submission/models/workspaceitem.model';
|
||||||
|
|
||||||
export const SD_TEST_GROUP = new FormGroup({
|
export const SD_TEST_GROUP = new FormGroup({
|
||||||
dropdown: new FormControl(),
|
dropdown: new FormControl(),
|
||||||
@@ -38,7 +39,8 @@ export const SD_TEST_MODEL_CONFIG = {
|
|||||||
readOnly: false,
|
readOnly: false,
|
||||||
required: false,
|
required: false,
|
||||||
repeatable: false,
|
repeatable: false,
|
||||||
value: undefined
|
value: undefined,
|
||||||
|
workspaceItem: new WorkspaceItem()
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('Dynamic Dynamic Scrollable Dropdown component', () => {
|
describe('Dynamic Dynamic Scrollable Dropdown component', () => {
|
||||||
|
@@ -49,6 +49,7 @@ import { DynamicConcatModel } from './ds-dynamic-form-ui/models/ds-dynamic-conca
|
|||||||
import { DynamicLookupNameModel } from './ds-dynamic-form-ui/models/lookup/dynamic-lookup-name.model';
|
import { DynamicLookupNameModel } from './ds-dynamic-form-ui/models/lookup/dynamic-lookup-name.model';
|
||||||
import { DynamicRowArrayModel } from './ds-dynamic-form-ui/models/ds-dynamic-row-array-model';
|
import { DynamicRowArrayModel } from './ds-dynamic-form-ui/models/ds-dynamic-row-array-model';
|
||||||
import { FormRowModel } from '../../../core/config/models/config-submission-form.model';
|
import { FormRowModel } from '../../../core/config/models/config-submission-form.model';
|
||||||
|
import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model';
|
||||||
|
|
||||||
describe('FormBuilderService test suite', () => {
|
describe('FormBuilderService test suite', () => {
|
||||||
|
|
||||||
@@ -193,11 +194,11 @@ describe('FormBuilderService test suite', () => {
|
|||||||
|
|
||||||
new DynamicColorPickerModel({id: 'testColorPicker'}),
|
new DynamicColorPickerModel({id: 'testColorPicker'}),
|
||||||
|
|
||||||
new DynamicTypeaheadModel({id: 'testTypeahead'}),
|
new DynamicTypeaheadModel({id: 'testTypeahead', workspaceItem: new WorkspaceItem(), repeatable: false}),
|
||||||
|
|
||||||
new DynamicScrollableDropdownModel({id: 'testScrollableDropdown', authorityOptions: authorityOptions}),
|
new DynamicScrollableDropdownModel({id: 'testScrollableDropdown', authorityOptions: authorityOptions, workspaceItem: new WorkspaceItem(), repeatable: false}),
|
||||||
|
|
||||||
new DynamicTagModel({id: 'testTag'}),
|
new DynamicTagModel({id: 'testTag', workspaceItem: new WorkspaceItem(), repeatable: false}),
|
||||||
|
|
||||||
new DynamicListCheckboxGroupModel({id: 'testCheckboxList', authorityOptions: authorityOptions, repeatable: true}),
|
new DynamicListCheckboxGroupModel({id: 'testCheckboxList', authorityOptions: authorityOptions, repeatable: true}),
|
||||||
|
|
||||||
@@ -239,14 +240,16 @@ describe('FormBuilderService test suite', () => {
|
|||||||
name: 'testRelationGroup',
|
name: 'testRelationGroup',
|
||||||
relationFields: [],
|
relationFields: [],
|
||||||
scopeUUID: '',
|
scopeUUID: '',
|
||||||
submissionScope: ''
|
submissionScope: '',
|
||||||
|
workspaceItem: new WorkspaceItem(),
|
||||||
|
repeatable: false
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new DynamicDsDatePickerModel({id: 'testDate'}),
|
new DynamicDsDatePickerModel({id: 'testDate'}),
|
||||||
|
|
||||||
new DynamicLookupModel({id: 'testLookup'}),
|
new DynamicLookupModel({id: 'testLookup', workspaceItem: new WorkspaceItem(), repeatable: false}),
|
||||||
|
|
||||||
new DynamicLookupNameModel({id: 'testLookupName'}),
|
new DynamicLookupNameModel({id: 'testLookupName', workspaceItem: new WorkspaceItem(), repeatable: false}),
|
||||||
|
|
||||||
new DynamicQualdropModel({id: 'testCombobox', readOnly: false}),
|
new DynamicQualdropModel({id: 'testCombobox', readOnly: false}),
|
||||||
|
|
||||||
@@ -406,7 +409,7 @@ describe('FormBuilderService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should create an array of form models', () => {
|
it('should create an array of form models', () => {
|
||||||
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID');
|
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID', {}, new WorkspaceItem());
|
||||||
|
|
||||||
expect(formModel[0] instanceof DynamicRowGroupModel).toBe(true);
|
expect(formModel[0] instanceof DynamicRowGroupModel).toBe(true);
|
||||||
expect((formModel[0] as DynamicRowGroupModel).group.length).toBe(3);
|
expect((formModel[0] as DynamicRowGroupModel).group.length).toBe(3);
|
||||||
@@ -427,7 +430,7 @@ describe('FormBuilderService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return form\'s fields value from form model', () => {
|
it('should return form\'s fields value from form model', () => {
|
||||||
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID');
|
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID', {}, new WorkspaceItem());
|
||||||
let value = {} as any;
|
let value = {} as any;
|
||||||
|
|
||||||
expect(service.getValueFromModel(formModel)).toEqual(value);
|
expect(service.getValueFromModel(formModel)).toEqual(value);
|
||||||
@@ -448,7 +451,7 @@ describe('FormBuilderService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should clear all form\'s fields value', () => {
|
it('should clear all form\'s fields value', () => {
|
||||||
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID');
|
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID', {}, new WorkspaceItem());
|
||||||
const value = {} as any;
|
const value = {} as any;
|
||||||
|
|
||||||
((formModel[0] as DynamicRowGroupModel).get(1) as DsDynamicInputModel).valueUpdates.next('test');
|
((formModel[0] as DynamicRowGroupModel).get(1) as DsDynamicInputModel).valueUpdates.next('test');
|
||||||
@@ -460,7 +463,7 @@ describe('FormBuilderService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return true when model has a custom group model as parent', () => {
|
it('should return true when model has a custom group model as parent', () => {
|
||||||
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID');
|
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID', {}, new WorkspaceItem());
|
||||||
let model = service.findById('dc_identifier_QUALDROP_VALUE', formModel);
|
let model = service.findById('dc_identifier_QUALDROP_VALUE', formModel);
|
||||||
let modelParent = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
let modelParent = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
||||||
model.parent = modelParent;
|
model.parent = modelParent;
|
||||||
@@ -489,7 +492,7 @@ describe('FormBuilderService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return true when model value is a map', () => {
|
it('should return true when model value is a map', () => {
|
||||||
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID');
|
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID', {}, new WorkspaceItem());
|
||||||
const model = service.findById('dc_identifier_QUALDROP_VALUE', formModel);
|
const model = service.findById('dc_identifier_QUALDROP_VALUE', formModel);
|
||||||
const modelParent = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
const modelParent = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
||||||
model.parent = modelParent;
|
model.parent = modelParent;
|
||||||
@@ -498,7 +501,7 @@ describe('FormBuilderService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return true when model is a Qualdrop Group', () => {
|
it('should return true when model is a Qualdrop Group', () => {
|
||||||
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID');
|
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID', {}, new WorkspaceItem());
|
||||||
let model = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
let model = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
||||||
|
|
||||||
expect(service.isQualdropGroup(model)).toBe(true);
|
expect(service.isQualdropGroup(model)).toBe(true);
|
||||||
@@ -509,7 +512,7 @@ describe('FormBuilderService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return true when model is a Custom or List Group', () => {
|
it('should return true when model is a Custom or List Group', () => {
|
||||||
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID');
|
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID', {}, new WorkspaceItem());
|
||||||
let model = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
let model = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
||||||
|
|
||||||
expect(service.isCustomOrListGroup(model)).toBe(true);
|
expect(service.isCustomOrListGroup(model)).toBe(true);
|
||||||
@@ -528,7 +531,7 @@ describe('FormBuilderService test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should return true when model is a Custom Group', () => {
|
it('should return true when model is a Custom Group', () => {
|
||||||
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID');
|
const formModel = service.modelFromConfiguration(testFormConfiguration, 'testScopeUUID', {}, new WorkspaceItem());
|
||||||
let model = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
let model = service.findById('dc_identifier_QUALDROP_GROUP', formModel);
|
||||||
|
|
||||||
expect(service.isCustomGroup(model)).toBe(true);
|
expect(service.isCustomGroup(model)).toBe(true);
|
||||||
|
@@ -18,4 +18,9 @@ export class SearchResult<T extends DSpaceObject> extends ListableObject {
|
|||||||
*/
|
*/
|
||||||
@excludeFromEquals
|
@excludeFromEquals
|
||||||
hitHighlights: MetadataMap;
|
hitHighlights: MetadataMap;
|
||||||
|
|
||||||
|
@excludeFromEquals
|
||||||
|
_links: {};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user