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: {},
|
||||
xPositionReference: XPositionReference.Left,
|
||||
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) => {
|
||||
|
|
|
@ -5,6 +5,7 @@ import { ElementsSidebar } from './ElementsSidebar';
|
|||
import { IContainerModel } from '../../Interfaces/IContainerModel';
|
||||
import { XPositionReference } from '../../Enums/XPositionReference';
|
||||
import { FindContainerById } from '../../utils/itertools';
|
||||
import { DEFAULT_MAINCONTAINER_PROPS } from '../../utils/default';
|
||||
|
||||
describe.concurrent('Elements sidebar', () => {
|
||||
it('With a MainContainer', () => {
|
||||
|
@ -13,23 +14,7 @@ describe.concurrent('Elements sidebar', () => {
|
|||
mainContainer={{
|
||||
children: [],
|
||||
parent: null,
|
||||
properties: {
|
||||
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
|
||||
},
|
||||
properties: DEFAULT_MAINCONTAINER_PROPS,
|
||||
userData: {}
|
||||
}}
|
||||
isOpen={true}
|
||||
|
@ -48,23 +33,7 @@ describe.concurrent('Elements sidebar', () => {
|
|||
const mainContainer: IContainerModel = {
|
||||
children: [],
|
||||
parent: null,
|
||||
properties: {
|
||||
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
|
||||
},
|
||||
properties: DEFAULT_MAINCONTAINER_PROPS,
|
||||
userData: {}
|
||||
};
|
||||
|
||||
|
@ -110,23 +79,7 @@ describe.concurrent('Elements sidebar', () => {
|
|||
const mainContainer: IContainerModel = {
|
||||
children,
|
||||
parent: null,
|
||||
properties: {
|
||||
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
|
||||
},
|
||||
properties: DEFAULT_MAINCONTAINER_PROPS,
|
||||
userData: {}
|
||||
};
|
||||
|
||||
|
@ -149,6 +102,10 @@ describe.concurrent('Elements sidebar', () => {
|
|||
maxWidth: Infinity,
|
||||
type: 'type',
|
||||
isAnchor: false,
|
||||
showChildrenDimensions: true,
|
||||
showSelfDimensions: true,
|
||||
isDimensionBorrower: true,
|
||||
markPositionToDimensionBorrower: false,
|
||||
xPositionReference: XPositionReference.Left
|
||||
},
|
||||
userData: {}
|
||||
|
@ -174,6 +131,10 @@ describe.concurrent('Elements sidebar', () => {
|
|||
isFlex: false,
|
||||
maxWidth: Infinity,
|
||||
type: 'type',
|
||||
showChildrenDimensions: true,
|
||||
showSelfDimensions: true,
|
||||
isDimensionBorrower: true,
|
||||
markPositionToDimensionBorrower: false,
|
||||
isAnchor: false
|
||||
},
|
||||
userData: {}
|
||||
|
@ -202,23 +163,7 @@ describe.concurrent('Elements sidebar', () => {
|
|||
const mainContainer: IContainerModel = {
|
||||
children,
|
||||
parent: null,
|
||||
properties: {
|
||||
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
|
||||
},
|
||||
properties: DEFAULT_MAINCONTAINER_PROPS,
|
||||
userData: {}
|
||||
};
|
||||
|
||||
|
@ -240,6 +185,10 @@ describe.concurrent('Elements sidebar', () => {
|
|||
isFlex: false,
|
||||
maxWidth: Infinity,
|
||||
type: 'type',
|
||||
showChildrenDimensions: true,
|
||||
showSelfDimensions: true,
|
||||
isDimensionBorrower: true,
|
||||
markPositionToDimensionBorrower: false,
|
||||
isAnchor: false
|
||||
},
|
||||
userData: {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue