added wait to ensure transaction is on block before next test

This commit is contained in:
Cody Douglass
2019-02-21 18:46:10 -05:00
parent 2c0758495a
commit 98936e3588
+4 -3
View File
@@ -4,9 +4,10 @@ describe('eosjs web test', () => {
});
it('runs all tests successfully', () => {
cy.visit(('./src/tests/web.html'))
cy.get('div.tests>div>button').each((test) => {
cy.wrap(test).click();
cy.wrap(test).contains('Success', { timeout: 5000 })
cy.get('div.tests>div>button').each((test) => { // iterate through all the tests
cy.wrap(test).click(); // click the button to start the test
cy.wrap(test).contains('Success', { timeout: 5000 }); // wait 5 seconds for success or treat as failure
cy.wait(500); // allow time for transaction to confirm (prevents duplicate transactions)
});
});
})