test: correct drag test position

This commit is contained in:
braks
2022-11-06 12:12:44 +01:00
parent 9b60790c31
commit e9943d52ab
3 changed files with 10 additions and 34 deletions
+2 -2
View File
@@ -9,6 +9,7 @@ describe('Check if nodes are draggable', () => {
beforeEach(() => {
cy.vueFlow({
modelValue: [nodes[0]],
fitViewOnInit: false,
})
})
@@ -29,14 +30,13 @@ describe('Check if nodes are draggable', () => {
force: true,
view: win,
})
await cy.tryAssertion(() => {
cy.get(`[data-id="${nodes[0].id}"]`)
.should('be.visible')
.should(
'have.css',
'transform',
`matrix(1, 0, 0, 1, ${store.nodes.value[0].computedPosition.x}, ${store.nodes.value[0].computedPosition.x})`,
`matrix(1, 0, 0, 1, ${store.nodes.value[0].computedPosition.x}, ${store.nodes.value[0].computedPosition.y})`,
)
})
})