From 55d692ea6f01cce3cac68fdffad79978e8309ac0 Mon Sep 17 00:00:00 2001 From: daro-maj <119658839+daro-maj@users.noreply.github.com> Date: Fri, 23 Feb 2024 10:27:35 +0100 Subject: [PATCH] test(governance): revert tests (#5808) Co-authored-by: daniel1302 --- .../src/integration/proposal.cy.js | 2 +- .../src/integration/view/home.cy.ts | 28 +++++++++---------- .../src/integration/view/proposal.cy.ts | 6 ++-- .../src/integration/view/pubkey-view.cy.ts | 4 +-- .../src/integration/view/validators.cy.ts | 6 ++-- .../cypress/src/lib/capsule/ethereum-setup.ts | 2 +- .../cypress/src/lib/commands/create-market.ts | 2 +- .../lib/commands/validators-self-delegate.ts | 4 +-- vegacapsule/genesis.tmpl | 1 + 9 files changed, 28 insertions(+), 27 deletions(-) diff --git a/apps/explorer-e2e/src/integration/proposal.cy.js b/apps/explorer-e2e/src/integration/proposal.cy.js index 3d1568141..bd60a70c9 100644 --- a/apps/explorer-e2e/src/integration/proposal.cy.js +++ b/apps/explorer-e2e/src/integration/proposal.cy.js @@ -1,7 +1,7 @@ import { getNewAssetTxBody } from '../support/governance.functions'; context('Proposal page', { tags: '@smoke' }, function () { - describe('Verify elements on page', function () { + describe.skip('Verify elements on page', function () { const proposalHeading = 'proposals-heading'; const dateTimeRegex = /(\d{1,2})\/(\d{1,2})\/(\d{4}), (\d{1,2}):(\d{1,2}):(\d{1,2})/gm; diff --git a/apps/governance-e2e/src/integration/view/home.cy.ts b/apps/governance-e2e/src/integration/view/home.cy.ts index 1dda6adf8..0c77b8162 100644 --- a/apps/governance-e2e/src/integration/view/home.cy.ts +++ b/apps/governance-e2e/src/integration/view/home.cy.ts @@ -7,7 +7,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () { }); describe('Links and buttons', function () { - it.skip('should have link for proposal page', function () { + it('should have link for proposal page', function () { cy.getByTestId('home-proposals').within(() => { cy.get('[href="/proposals"]') .should('exist') @@ -51,7 +51,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () { }); }); - it.skip('should have external link for governance', function () { + it('should have external link for governance', function () { cy.getByTestId('home-proposals').within(() => { cy.getByTestId('external-link') .should('have.attr', 'href') @@ -59,7 +59,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () { }); }); - it.skip('should have link for validator page', function () { + it('should have link for validator page', function () { cy.getByTestId('home-validators').within(() => { cy.get('[href="/validators"]') .first() @@ -68,7 +68,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () { }); }); - it.skip('should have external link for validators', function () { + it('should have external link for validators', function () { cy.getByTestId('home-validators').within(() => { cy.getByTestId('external-link') .should('have.attr', 'href') @@ -79,29 +79,29 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () { }); }); - it.skip('should have information on active nodes', function () { + it('should have information on active nodes', function () { cy.getByTestId('node-information') .first() - .should('contain.text', '2') + .should('contain.text', '1') .and('contain.text', 'active nodes'); }); - it.skip('should have information on consensus nodes', function () { + it('should have information on consensus nodes', function () { cy.getByTestId('node-information') .last() - .should('contain.text', '2') + .should('contain.text', '1') .and('contain.text', 'consensus nodes'); }); - it.skip('should contain link to specific validators', function () { + it('should contain link to specific validators', function () { cy.getByTestId('validators') - .should('have.length', '2') + .should('have.length', '1') .each(($validator) => { cy.wrap($validator).find('a').should('have.attr', 'href'); }); }); - it.skip('should have link for rewards page', function () { + it('should have link for rewards page', function () { cy.getByTestId('home-rewards').within(() => { cy.get('[href="/rewards"]') .first() @@ -110,7 +110,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () { }); }); - it.skip('should have link for withdrawal page', function () { + it('should have link for withdrawal page', function () { cy.getByTestId('home-vega-token').within(() => { cy.get('[href="/token/withdraw"]') .first() @@ -132,7 +132,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () { }); // 0006-NETW-003 0006-NETW-008 0006-NETW-009 0006-NETW-010 0006-NETW-012 0006-NETW-013 0006-NETW-017 0006-NETW-018 0006-NETW-019 0006-NETW-020 - it.skip('should have option to switch to different network node', function () { + it('should have option to switch to different network node', function () { cy.getByTestId('git-network-data').within(() => { cy.getByTestId('link').click(); }); @@ -159,7 +159,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () { cy.getByTestId('node-url-custom').click({ force: true }); cy.get('input').should('exist'); cy.getByTestId('connect').should('be.disabled'); - cy.getByTestId('icon-cross').click(); + cy.getByTestId('dialog-close').click(); }); it('should display eth data', function () { diff --git a/apps/governance-e2e/src/integration/view/proposal.cy.ts b/apps/governance-e2e/src/integration/view/proposal.cy.ts index 49c1c807b..efac2b02e 100644 --- a/apps/governance-e2e/src/integration/view/proposal.cy.ts +++ b/apps/governance-e2e/src/integration/view/proposal.cy.ts @@ -33,12 +33,12 @@ context( verifyTabHighlighted(navigation.proposals); }); - it.skip('should have GOVERNANCE header visible', function () { + it('should have GOVERNANCE header visible', function () { verifyPageHeader('Proposals'); }); // 3002-PROP-023 3004-PMAC-002 3005-PASN-002 3006-PASC-002 3007-PNEC-002 3008-PFRO-003 - it.skip('new proposal page should have button for link to more information on proposals', function () { + it('new proposal page should have button for link to more information on proposals', function () { cy.getByTestId('new-proposal-link').click(); cy.url().should('include', '/proposals/propose/raw'); cy.contains('To see Explorer data on proposals visit').within(() => { @@ -73,7 +73,7 @@ context( navigateTo(navigation.proposals); }); - it.skip('should be able to see a working link for - find out more about Vega governance', function () { + it('should be able to see a working link for - find out more about Vega governance', function () { // 3001-VOTE-001 // 3002-PROP-001 cy.getByTestId(proposalDocumentationLink) .should('be.visible') diff --git a/apps/governance-e2e/src/integration/view/pubkey-view.cy.ts b/apps/governance-e2e/src/integration/view/pubkey-view.cy.ts index 2b971fbb4..bc1b4537f 100644 --- a/apps/governance-e2e/src/integration/view/pubkey-view.cy.ts +++ b/apps/governance-e2e/src/integration/view/pubkey-view.cy.ts @@ -40,10 +40,10 @@ context('View functionality with public key', { tags: '@smoke' }, function () { verifyConnectedToPubKey(); }); - it('Able to connect public key via wallet and view assets in wallet', function () { + it.skip('Able to connect public key via wallet and view assets in wallet', function () { verifyConnectedToPubKey(); cy.getByTestId('currency-title', { timeout: 10000 }) - .should('have.length.at.least', 4) + .should('have.length.at.least', 2) .and('contain.text', 'USDC (fake)'); }); diff --git a/apps/governance-e2e/src/integration/view/validators.cy.ts b/apps/governance-e2e/src/integration/view/validators.cy.ts index 002491e90..791bf01d4 100644 --- a/apps/governance-e2e/src/integration/view/validators.cy.ts +++ b/apps/governance-e2e/src/integration/view/validators.cy.ts @@ -46,11 +46,11 @@ context('Validators Page - verify elements on page', function () { // @ts-ignore clash between jest and cypress describe('with wallets disconnected', { tags: '@smoke' }, function () { - it.skip('Should have validators tab highlighted', function () { + it('Should have validators tab highlighted', function () { verifyTabHighlighted(navigation.validators); }); - it.skip('Should have validators ON VEGA header visible', function () { + it('Should have validators ON VEGA header visible', function () { verifyPageHeader('Validators'); }); @@ -192,7 +192,7 @@ context('Validators Page - verify elements on page', function () { }); // 1002-STKE-006 - it.skip('Should be able to see validator name', function () { + it('Should be able to see validator name', function () { cy.getByTestId(validatorTitle).should('not.be.empty'); }); diff --git a/libs/cypress/src/lib/capsule/ethereum-setup.ts b/libs/cypress/src/lib/capsule/ethereum-setup.ts index 88f405c8f..120eb4291 100644 --- a/libs/cypress/src/lib/capsule/ethereum-setup.ts +++ b/libs/cypress/src/lib/capsule/ethereum-setup.ts @@ -71,7 +71,7 @@ function waitForStake(vegaPublicKey: string) { let tick = 1; const interval = setInterval(async () => { log(`confirming stake (attempt: ${tick})`); - if (tick >= 30) { + if (tick >= 90) { clearInterval(interval); reject(new Error('stake link never seen')); } diff --git a/libs/cypress/src/lib/commands/create-market.ts b/libs/cypress/src/lib/commands/create-market.ts index 49a802fa2..3cff9352b 100644 --- a/libs/cypress/src/lib/commands/create-market.ts +++ b/libs/cypress/src/lib/commands/create-market.ts @@ -25,7 +25,7 @@ export const addCreateMarket = () => { cy.highlight('creating market on capsule environment'); cy.wrap(createMarket(config), { - timeout: 5 * 60 * 1000, + timeout: 9 * 60 * 1000, }) // register market list result so it can be retrieved in tests later .as('markets'); diff --git a/libs/cypress/src/lib/commands/validators-self-delegate.ts b/libs/cypress/src/lib/commands/validators-self-delegate.ts index a31f22b8d..8efcc3ec4 100644 --- a/libs/cypress/src/lib/commands/validators-self-delegate.ts +++ b/libs/cypress/src/lib/commands/validators-self-delegate.ts @@ -111,7 +111,7 @@ export const addValidatorsSelfDelegate = () => { String(node0ApiToken), String(node0Id) ), - { timeout: 60000 } + { timeout: 90000 } ); // Self delegating Node 1 wallet cy.get('@node1PubKey').then((node1PubKey) => { @@ -124,7 +124,7 @@ export const addValidatorsSelfDelegate = () => { String(node1ApiToken), String(node1Id) ), - { timeout: 60000 } + { timeout: 90000 } ); }); }); diff --git a/vegacapsule/genesis.tmpl b/vegacapsule/genesis.tmpl index 273b1edec..fb35299b7 100644 --- a/vegacapsule/genesis.tmpl +++ b/vegacapsule/genesis.tmpl @@ -175,6 +175,7 @@ }, "network_parameters": { "blockchains.ethereumConfig": "{\"network_id\": \"{{ .NetworkID }}\", \"chain_id\": \"{{ .ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"staking_bridge_contract\": { \"address\": \"{{.GetEthContractAddr "staking_bridge"}}\", \"deployment_block_height\": 0}, \"token_vesting_contract\": { \"address\": \"{{.GetEthContractAddr "erc20_vesting"}}\", \"deployment_block_height\": 0 }, \"multisig_control_contract\": { \"address\": \"{{.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}", + "blockchains.ethereumRpcAndEvmCompatDataSourcesConfig": "{\"configs\": []}", "governance.proposal.asset.minClose": "2s", "governance.proposal.asset.minEnact": "2s", "governance.proposal.asset.requiredParticipation": "0.00000000000000000000000015",