This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #986 from bradlhart/cicd_integration_tests_develop
Separates the web tests to separate tests and adds conditionals
- Loading branch information
Showing
5 changed files
with
175 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,145 @@ | ||
import { skipOn } from '@cypress/skip-test'; | ||
|
||
describe('eosjs web test', () => { | ||
it('loads', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
}); | ||
it('runs all tests successfully', () => { | ||
cy.visit(('./src/tests/web.html')) | ||
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) | ||
}); | ||
}); | ||
}) | ||
it('loads', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
}); | ||
|
||
it('test Transact With Config Blocks Behind', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testTransactWithConfigBlocksBehind').click(); | ||
cy.get('#testTransactWithConfigBlocksBehind').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Transact With Config Use Last Irreversible', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testTransactWithConfigUseLastIrreversible').click(); | ||
cy.get('#testTransactWithConfigUseLastIrreversible').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Transact Without Config', () => { | ||
if (Cypress.env('NODEOS_VER')) skipOn(Cypress.env('NODEOS_VER') === 'release/2.0.x'); | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testTransactWithoutConfig').click(); | ||
cy.get('#testTransactWithoutConfig').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Transact With Compression', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testTransactWithCompression').click(); | ||
cy.get('#testTransactWithCompression').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Transact With Context Free Action', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testTransactWithContextFreeAction').click(); | ||
cy.get('#testTransactWithContextFreeAction').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Transact With Context Free Data', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testTransactWithContextFreeData').click(); | ||
cy.get('#testTransactWithContextFreeData').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Transact Without Broadcast', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testTransactWithoutBroadcast').click(); | ||
cy.get('#testTransactWithoutBroadcast').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Broadcast Result', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testBroadcastResult').click(); | ||
cy.get('#testBroadcastResult').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Shorthand With Api Json', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testShorthandWithApiJson').click(); | ||
cy.get('#testShorthandWithApiJson').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Shorthand With Tx Json', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testShorthandWithTxJson').click(); | ||
cy.get('#testShorthandWithTxJson').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Shorthand With Tx Json Context Free Action', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testShorthandWithTxJsonContextFreeAction').click(); | ||
cy.get('#testShorthandWithTxJsonContextFreeAction').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Shorthand With Tx Json Context Free Data', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testShorthandWithTxJsonContextFreeData').click(); | ||
cy.get('#testShorthandWithTxJsonContextFreeData').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test With P256 Elliptic Curve', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testWithP256EllipticCurve').click(); | ||
cy.get('#testWithP256EllipticCurve').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test With Return Value Tx', () => { | ||
if (Cypress.env('NODEOS_VER')) skipOn(Cypress.env('NODEOS_VER') === 'release/2.0.x'); | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testWithReturnValueTx').click(); | ||
cy.get('#testWithReturnValueTx').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test With Resource Payer Tx', () => { | ||
if (Cypress.env('NODEOS_VER')) skipOn(Cypress.env('NODEOS_VER') === 'release/2.0.x' || Cypress.env('NODEOS_VER') === 'release/2.1.x'); | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testWithResourcePayerTx').click(); | ||
cy.get('#testWithResourcePayerTx').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test With Read Only Query', () => { | ||
if (Cypress.env('NODEOS_VER')) skipOn(Cypress.env('NODEOS_VER') === 'release/2.0.x' || Cypress.env('NODEOS_VER') === 'release/2.1.x'); | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testWithReadOnlyQuery').click(); | ||
cy.get('#testWithReadOnlyQuery').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test With Read Only Failure Trace', () => { | ||
if (Cypress.env('NODEOS_VER')) skipOn(Cypress.env('NODEOS_VER') === 'release/2.0.x' || Cypress.env('NODEOS_VER') === 'release/2.1.x'); | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testWithReadOnlyFailureTrace').click(); | ||
cy.get('#testWithReadOnlyFailureTrace').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Transact Should Fail', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testTransactShouldFail').click(); | ||
cy.get('#testTransactShouldFail').contains('Success', { timeout: 5000 }); | ||
}); | ||
|
||
it('test Rpc Should Fail', () => { | ||
cy.visit(('./src/tests/web.html')); | ||
cy.wait(500); | ||
cy.get('#testRpcShouldFail').click(); | ||
cy.get('#testRpcShouldFail').contains('Success', { timeout: 5000 }); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters