Update tests with new properties
This commit is contained in:
parent
5aaf1f4745
commit
b6571e32d2
2 changed files with 22 additions and 69 deletions
|
@ -35,7 +35,11 @@ describe.concurrent('Properties', () => {
|
||||||
margin: {},
|
margin: {},
|
||||||
xPositionReference: XPositionReference.Left,
|
xPositionReference: XPositionReference.Left,
|
||||||
isFlex: false,
|
isFlex: false,
|
||||||
isAnchor: false
|
isAnchor: false,
|
||||||
|
showChildrenDimensions: true, // TODO: put the dimension at the top (see pdf)
|
||||||
|
showSelfDimensions: true, // TODO: put the dimension at the bottom (see pdf)
|
||||||
|
isDimensionBorrower: true, // second dimensions from the bottom
|
||||||
|
markPositionToDimensionBorrower: false
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleChange = vi.fn((key, value) => {
|
const handleChange = vi.fn((key, value) => {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { ElementsSidebar } from './ElementsSidebar';
|
||||||
import { IContainerModel } from '../../Interfaces/IContainerModel';
|
import { IContainerModel } from '../../Interfaces/IContainerModel';
|
||||||
import { XPositionReference } from '../../Enums/XPositionReference';
|
import { XPositionReference } from '../../Enums/XPositionReference';
|
||||||
import { FindContainerById } from '../../utils/itertools';
|
import { FindContainerById } from '../../utils/itertools';
|
||||||
|
import { DEFAULT_MAINCONTAINER_PROPS } from '../../utils/default';
|
||||||
|
|
||||||
describe.concurrent('Elements sidebar', () => {
|
describe.concurrent('Elements sidebar', () => {
|
||||||
it('With a MainContainer', () => {
|
it('With a MainContainer', () => {
|
||||||
|
@ -13,23 +14,7 @@ describe.concurrent('Elements sidebar', () => {
|
||||||
mainContainer={{
|
mainContainer={{
|
||||||
children: [],
|
children: [],
|
||||||
parent: null,
|
parent: null,
|
||||||
properties: {
|
properties: DEFAULT_MAINCONTAINER_PROPS,
|
||||||
id: 'main',
|
|
||||||
parentId: '',
|
|
||||||
linkedSymbolId: '',
|
|
||||||
displayedText: 'main',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
width: 2000,
|
|
||||||
height: 100,
|
|
||||||
margin: {},
|
|
||||||
minWidth: 1,
|
|
||||||
type: 'type',
|
|
||||||
maxWidth: Infinity,
|
|
||||||
isFlex: false,
|
|
||||||
xPositionReference: XPositionReference.Left,
|
|
||||||
isAnchor: false
|
|
||||||
},
|
|
||||||
userData: {}
|
userData: {}
|
||||||
}}
|
}}
|
||||||
isOpen={true}
|
isOpen={true}
|
||||||
|
@ -48,23 +33,7 @@ describe.concurrent('Elements sidebar', () => {
|
||||||
const mainContainer: IContainerModel = {
|
const mainContainer: IContainerModel = {
|
||||||
children: [],
|
children: [],
|
||||||
parent: null,
|
parent: null,
|
||||||
properties: {
|
properties: DEFAULT_MAINCONTAINER_PROPS,
|
||||||
id: 'main',
|
|
||||||
parentId: '',
|
|
||||||
linkedSymbolId: '',
|
|
||||||
displayedText: 'main',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
width: 2000,
|
|
||||||
height: 100,
|
|
||||||
margin: {},
|
|
||||||
minWidth: 1,
|
|
||||||
isFlex: false,
|
|
||||||
maxWidth: Infinity,
|
|
||||||
type: 'type',
|
|
||||||
isAnchor: false,
|
|
||||||
xPositionReference: XPositionReference.Left
|
|
||||||
},
|
|
||||||
userData: {}
|
userData: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -110,23 +79,7 @@ describe.concurrent('Elements sidebar', () => {
|
||||||
const mainContainer: IContainerModel = {
|
const mainContainer: IContainerModel = {
|
||||||
children,
|
children,
|
||||||
parent: null,
|
parent: null,
|
||||||
properties: {
|
properties: DEFAULT_MAINCONTAINER_PROPS,
|
||||||
id: 'main',
|
|
||||||
parentId: '',
|
|
||||||
linkedSymbolId: '',
|
|
||||||
displayedText: 'main',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
minWidth: 1,
|
|
||||||
width: 2000,
|
|
||||||
height: 100,
|
|
||||||
xPositionReference: XPositionReference.Left,
|
|
||||||
margin: {},
|
|
||||||
isFlex: false,
|
|
||||||
maxWidth: Infinity,
|
|
||||||
type: 'type',
|
|
||||||
isAnchor: false
|
|
||||||
},
|
|
||||||
userData: {}
|
userData: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -149,6 +102,10 @@ describe.concurrent('Elements sidebar', () => {
|
||||||
maxWidth: Infinity,
|
maxWidth: Infinity,
|
||||||
type: 'type',
|
type: 'type',
|
||||||
isAnchor: false,
|
isAnchor: false,
|
||||||
|
showChildrenDimensions: true,
|
||||||
|
showSelfDimensions: true,
|
||||||
|
isDimensionBorrower: true,
|
||||||
|
markPositionToDimensionBorrower: false,
|
||||||
xPositionReference: XPositionReference.Left
|
xPositionReference: XPositionReference.Left
|
||||||
},
|
},
|
||||||
userData: {}
|
userData: {}
|
||||||
|
@ -174,6 +131,10 @@ describe.concurrent('Elements sidebar', () => {
|
||||||
isFlex: false,
|
isFlex: false,
|
||||||
maxWidth: Infinity,
|
maxWidth: Infinity,
|
||||||
type: 'type',
|
type: 'type',
|
||||||
|
showChildrenDimensions: true,
|
||||||
|
showSelfDimensions: true,
|
||||||
|
isDimensionBorrower: true,
|
||||||
|
markPositionToDimensionBorrower: false,
|
||||||
isAnchor: false
|
isAnchor: false
|
||||||
},
|
},
|
||||||
userData: {}
|
userData: {}
|
||||||
|
@ -202,23 +163,7 @@ describe.concurrent('Elements sidebar', () => {
|
||||||
const mainContainer: IContainerModel = {
|
const mainContainer: IContainerModel = {
|
||||||
children,
|
children,
|
||||||
parent: null,
|
parent: null,
|
||||||
properties: {
|
properties: DEFAULT_MAINCONTAINER_PROPS,
|
||||||
id: 'main',
|
|
||||||
parentId: '',
|
|
||||||
linkedSymbolId: '',
|
|
||||||
displayedText: 'main',
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
minWidth: 1,
|
|
||||||
width: 2000,
|
|
||||||
height: 100,
|
|
||||||
xPositionReference: XPositionReference.Left,
|
|
||||||
margin: {},
|
|
||||||
isFlex: false,
|
|
||||||
maxWidth: Infinity,
|
|
||||||
type: 'type',
|
|
||||||
isAnchor: false
|
|
||||||
},
|
|
||||||
userData: {}
|
userData: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -240,6 +185,10 @@ describe.concurrent('Elements sidebar', () => {
|
||||||
isFlex: false,
|
isFlex: false,
|
||||||
maxWidth: Infinity,
|
maxWidth: Infinity,
|
||||||
type: 'type',
|
type: 'type',
|
||||||
|
showChildrenDimensions: true,
|
||||||
|
showSelfDimensions: true,
|
||||||
|
isDimensionBorrower: true,
|
||||||
|
markPositionToDimensionBorrower: false,
|
||||||
isAnchor: false
|
isAnchor: false
|
||||||
},
|
},
|
||||||
userData: {}
|
userData: {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue