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: `removeEdges`', () => {
})
it('removes edges from DOM', () => {
cy.get('.vue-flow__edge').then((els) => {
els.each((index, edge) => {
const edgeId = edge.getAttribute('data-id')
const storedEdge = store.findEdge(edgeId)
// todo: can we avoid the timeout? without it, the test fails in ci
setTimeout(() => {
cy.get('.vue-flow__edge').then((els) => {
els.each((index, edge) => {
const edgeId = edge.getAttribute('data-id')
const storedEdge = store.findEdge(edgeId)
expect(deletedEdges).to.not.include(edgeId)
expect(storedEdge).to.not.eq(undefined)
expect(deletedEdges).to.not.include(edgeId)
expect(storedEdge).to.not.eq(undefined)
})
})
})
}, 1)
})
})