chore(tests): wait to find edge
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -74,19 +74,21 @@ describe('Check if nodes can be connected', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('creates connection by dragging', () => {
|
it('creates connection by dragging', () => {
|
||||||
cy.get('.vue-flow__edge').should('have.length', 1)
|
cy.get('.vue-flow__edge')
|
||||||
|
.should('have.length', 1)
|
||||||
|
.then(() => {
|
||||||
|
expect(store.edges.value).to.have.length(1)
|
||||||
|
|
||||||
expect(store.edges.value).to.have.length(1)
|
const edge = store.edges.value[0]
|
||||||
|
expect(edge.source).to.eq('1')
|
||||||
|
expect(edge.target).to.eq('2')
|
||||||
|
|
||||||
const edge = store.edges.value[0]
|
const sourceHandleId = `1__handle-bottom`
|
||||||
expect(edge.source).to.eq('1')
|
const targetHandleId = `2__handle-top`
|
||||||
expect(edge.target).to.eq('2')
|
|
||||||
|
|
||||||
const sourceHandleId = `1__handle-bottom`
|
expect(edge.sourceHandle).to.eq(sourceHandleId)
|
||||||
const targetHandleId = `2__handle-top`
|
expect(edge.targetHandle).to.eq(targetHandleId)
|
||||||
|
})
|
||||||
expect(edge.sourceHandle).to.eq(sourceHandleId)
|
|
||||||
expect(edge.targetHandle).to.eq(targetHandleId)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('Emits events?', () => {
|
describe('Emits events?', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user