From 664c55960b97396ed4750287ba2cc680d63ff808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Szpiech?= Date: Tue, 23 Aug 2022 19:27:43 +0200 Subject: [PATCH] test: added missing block confirmation coverage (#1115) --- apps/token-e2e/cypress.config.js | 1 + .../src/integration/flow/token-association-flow.cy.js | 1 + apps/token-e2e/src/support/staking.functions.js | 8 ++++++++ apps/token/.env.capsule | 1 + 4 files changed, 11 insertions(+) diff --git a/apps/token-e2e/cypress.config.js b/apps/token-e2e/cypress.config.js index 9122d4985..efd954d0d 100644 --- a/apps/token-e2e/cypress.config.js +++ b/apps/token-e2e/cypress.config.js @@ -42,5 +42,6 @@ module.exports = defineConfig({ vegaTokenAddress: '0x67175Da1D5e966e40D11c4B2519392B2058373de', txTimeout: { timeout: 40000 }, epochTimeout: { timeout: 10000 }, + blockConfirmations: 3, }, }); diff --git a/apps/token-e2e/src/integration/flow/token-association-flow.cy.js b/apps/token-e2e/src/integration/flow/token-association-flow.cy.js index ad4b6d0d3..32405fac3 100644 --- a/apps/token-e2e/src/integration/flow/token-association-flow.cy.js +++ b/apps/token-e2e/src/integration/flow/token-association-flow.cy.js @@ -50,6 +50,7 @@ context( //1000-ASSO-0009 //1000-ASSO-0030 //1000-ASSO-0012 + //1000-ASSO-0013 //1000-ASSO-0014 //1000-ASSO-0015 //1000-ASSO-0030 diff --git a/apps/token-e2e/src/support/staking.functions.js b/apps/token-e2e/src/support/staking.functions.js index 89e9d7159..094de1bd3 100644 --- a/apps/token-e2e/src/support/staking.functions.js +++ b/apps/token-e2e/src/support/staking.functions.js @@ -73,6 +73,14 @@ Cypress.Commands.add('staking_page_associate_tokens', (amount, options) => { }).should('not.exist'); } cy.get(tokenSubmitButton, txTimeout).should('be.enabled').click(); + cy.contains( + `Associating with Vega key. Waiting for ${Cypress.env( + 'blockConfirmations' + )} more confirmations..`, + { + timeout: 8000, + } + ).should('be.visible'); cy.contains('can now participate in governance and nominate a validator', { timeout: 60000, }).should('be.visible'); diff --git a/apps/token/.env.capsule b/apps/token/.env.capsule index ee8a0feae..0abe43b40 100644 --- a/apps/token/.env.capsule +++ b/apps/token/.env.capsule @@ -12,6 +12,7 @@ NX_ETHEREUM_CHAIN_ID=1440 NX_ETH_URL_CONNECT=1 NX_ETH_WALLET_MNEMONIC=ozone access unlock valid olympic save include omit supply green clown session NX_LOCAL_PROVIDER_URL=http://localhost:8545/ +NX_VEGA_WALLET_URL=http://localhost:1789/api/v1 #Test configuration variables CYPRESS_FAIRGROUND=false