|
|
@ -7,7 +7,7 @@ import { |
|
|
import { CollectionStateVariableType } from '../../../../../src/data_sources/model/collection_component/types'; |
|
|
import { CollectionStateVariableType } from '../../../../../src/data_sources/model/collection_component/types'; |
|
|
import EditorModel from '../../../../../src/editor/model/Editor'; |
|
|
import EditorModel from '../../../../../src/editor/model/Editor'; |
|
|
import { filterObjectForSnapshot, setupTestEditor } from '../../../../common'; |
|
|
import { filterObjectForSnapshot, setupTestEditor } from '../../../../common'; |
|
|
import { getSymbolMain, getSymbolTop } from '../../../../../src/dom_components/model/SymbolUtils'; |
|
|
import { getSymbolMain } from '../../../../../src/dom_components/model/SymbolUtils'; |
|
|
import { ProjectData } from '../../../../../src/storage_manager'; |
|
|
import { ProjectData } from '../../../../../src/storage_manager'; |
|
|
|
|
|
|
|
|
describe('Collection component', () => { |
|
|
describe('Collection component', () => { |
|
|
@ -39,7 +39,7 @@ describe('Collection component', () => { |
|
|
em.destroy(); |
|
|
em.destroy(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
test('Should be undroppable', () => { |
|
|
test('Collection component should be undroppable', () => { |
|
|
const cmp = wrapper.components({ |
|
|
const cmp = wrapper.components({ |
|
|
type: CollectionComponentType, |
|
|
type: CollectionComponentType, |
|
|
collectionDefinition: { |
|
|
collectionDefinition: { |
|
|
@ -58,6 +58,27 @@ describe('Collection component', () => { |
|
|
expect(cmp.get('droppable')).toBe(false); |
|
|
expect(cmp.get('droppable')).toBe(false); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
test('Collection items should be undraggable', () => { |
|
|
|
|
|
const cmp = wrapper.components({ |
|
|
|
|
|
type: CollectionComponentType, |
|
|
|
|
|
collectionDefinition: { |
|
|
|
|
|
block: { |
|
|
|
|
|
type: 'default', |
|
|
|
|
|
}, |
|
|
|
|
|
config: { |
|
|
|
|
|
dataSource: { |
|
|
|
|
|
type: DataVariableType, |
|
|
|
|
|
path: 'my_data_source_id', |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
})[0]; |
|
|
|
|
|
|
|
|
|
|
|
cmp.components().forEach((child) => { |
|
|
|
|
|
expect(child.get('draggable')).toBe(false); |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
test('Collection items should be symbols', () => { |
|
|
test('Collection items should be symbols', () => { |
|
|
const cmp = wrapper.components({ |
|
|
const cmp = wrapper.components({ |
|
|
type: CollectionComponentType, |
|
|
type: CollectionComponentType, |
|
|
|