tests: use timeout to avoid cli run fails

This commit is contained in:
braks
2023-05-25 20:48:26 +02:00
committed by Braks
parent 1a083fc861
commit 9bf9c644be
8 changed files with 92 additions and 85 deletions
@@ -29,14 +29,17 @@ describe('Store Action: `removeNodes`', () => {
})
it('removes nodes from DOM', () => {
cy.get('.vue-flow__node').then((els) => {
els.each((index, node) => {
const nodeId = node.getAttribute('data-id')
const storedNode = store.findNode(nodeId)
// todo: can we avoid the timeout? without it, the test fails in ci
setTimeout(() => {
cy.get('.vue-flow__node').then((els) => {
els.each((index, node) => {
const nodeId = node.getAttribute('data-id')
const storedNode = store.findNode(nodeId)
expect(deletedNodes).to.not.include(nodeId)
expect(storedNode).to.not.eq(undefined)
expect(deletedNodes).to.not.include(nodeId)
expect(storedNode).to.not.eq(undefined)
})
})
})
}, 1)
})
})