tests: add tryAssertion command to replace cy.wait

This commit is contained in:
braks
2022-10-13 23:23:43 +02:00
committed by Braks
parent 0613350554
commit 5aa94e2e13
11 changed files with 78 additions and 42 deletions
@@ -19,7 +19,7 @@ describe('Store State: `deleteKeyCode`', () => {
cy.get('body').trigger('keydown', { key: 'Backspace' })
cy.wait(1).then(() => {
cy.tryAssertion(() => {
cy.get(`[data-id="${nodes[0].id}"]`).should('not.exist')
expect(store.nodes.value.some((node) => node.id === nodes[0].id)).to.equal(false)
})
@@ -33,7 +33,7 @@ describe('Store State: `deleteKeyCode`', () => {
cy.get('body').trigger('keydown', { key: 'Delete' })
cy.wait(1).then(() => {
cy.tryAssertion(() => {
cy.get(`[data-id="${nodes[0].id}"]`).should('not.exist')
expect(store.nodes.value.some((node) => node.id === nodes[0].id)).to.equal(false)
})