feat(core): add viewport helper to state

This commit is contained in:
braks
2024-02-05 07:51:12 +01:00
committed by Braks
parent fbadf9427f
commit c855dfe454
6 changed files with 39 additions and 19 deletions
+3 -4
View File
@@ -8,20 +8,19 @@ import { VueFlow } from '@vue-flow/core'
import type { FlowProps } from '@vue-flow/core'
function mountVueFlow(props?: FlowProps, attrs?: Record<string, any>, slots?: Record<string, any>) {
cy.mount(VueFlow as any, {
cy.mount(VueFlow, {
props: {
id: 'test',
fitViewOnInit: true,
...props,
} as FlowProps,
attrs: {
key: 'flowy',
style: {
height: '100vh',
width: '100vw',
},
} as CSSStyleDeclaration,
...attrs,
} as Record<string, any>,
},
slots,
})
}