mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
[TLC-254] Get Type Bind config from backend
This commit is contained in:
@@ -22,6 +22,7 @@ describe('RowParser test suite', () => {
|
||||
const initFormValues = {};
|
||||
const submissionScope = 'WORKSPACE';
|
||||
const readOnly = false;
|
||||
const typeField = 'dc_type';
|
||||
|
||||
beforeEach(() => {
|
||||
row1 = {
|
||||
@@ -338,7 +339,7 @@ describe('RowParser test suite', () => {
|
||||
it('should return a DynamicRowGroupModel object', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row1, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row1, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect(rowModel instanceof DynamicRowGroupModel).toBe(true);
|
||||
});
|
||||
@@ -346,7 +347,7 @@ describe('RowParser test suite', () => {
|
||||
it('should return a row with three fields', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row1, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row1, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect((rowModel as DynamicRowGroupModel).group.length).toBe(3);
|
||||
});
|
||||
@@ -354,7 +355,7 @@ describe('RowParser test suite', () => {
|
||||
it('should return a DynamicRowArrayModel object', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row2, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row2, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect(rowModel instanceof DynamicRowArrayModel).toBe(true);
|
||||
});
|
||||
@@ -362,7 +363,7 @@ describe('RowParser test suite', () => {
|
||||
it('should return a row that contains only scoped fields', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row3, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row3, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect((rowModel as DynamicRowGroupModel).group.length).toBe(1);
|
||||
});
|
||||
@@ -370,7 +371,7 @@ describe('RowParser test suite', () => {
|
||||
it('should be able to parse a dropdown combo field', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row4, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row4, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect(rowModel).toBeDefined();
|
||||
});
|
||||
@@ -378,7 +379,7 @@ describe('RowParser test suite', () => {
|
||||
it('should be able to parse a lookup-name field', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row5, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row5, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect(rowModel).toBeDefined();
|
||||
});
|
||||
@@ -386,7 +387,7 @@ describe('RowParser test suite', () => {
|
||||
it('should be able to parse a list field', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row6, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row6, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect(rowModel).toBeDefined();
|
||||
});
|
||||
@@ -394,7 +395,7 @@ describe('RowParser test suite', () => {
|
||||
it('should be able to parse a date field', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row7, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row7, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect(rowModel).toBeDefined();
|
||||
});
|
||||
@@ -402,7 +403,7 @@ describe('RowParser test suite', () => {
|
||||
it('should be able to parse a tag field', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row8, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row8, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect(rowModel).toBeDefined();
|
||||
});
|
||||
@@ -410,7 +411,7 @@ describe('RowParser test suite', () => {
|
||||
it('should be able to parse a textarea field', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row9, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row9, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect(rowModel).toBeDefined();
|
||||
});
|
||||
@@ -418,7 +419,7 @@ describe('RowParser test suite', () => {
|
||||
it('should be able to parse a group field', () => {
|
||||
const parser = new RowParser(undefined);
|
||||
|
||||
const rowModel = parser.parse(submissionId, row10, scopeUUID, initFormValues, submissionScope, readOnly);
|
||||
const rowModel = parser.parse(submissionId, row10, scopeUUID, initFormValues, submissionScope, readOnly, typeField);
|
||||
|
||||
expect(rowModel).toBeDefined();
|
||||
});
|
||||
|
Reference in New Issue
Block a user