From e20061d9219b411c013eab59df52388c3fc16212 Mon Sep 17 00:00:00 2001 From: Joe Tsang <30622993+jtsang586@users.noreply.github.com> Date: Fri, 16 Dec 2022 17:18:39 +0000 Subject: [PATCH] chore: fix failing governance test (#2426) * chore: fix failing governance test * chore: use parentuntil * chore: increase timeout for proposal query * chore: remove wait for proposal in smoke test * chore: add wallet teardown --- apps/token-e2e/src/integration/flow/governance-flow.cy.js | 2 +- apps/token-e2e/src/support/governance.functions.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/token-e2e/src/integration/flow/governance-flow.cy.js b/apps/token-e2e/src/integration/flow/governance-flow.cy.js index 8b8a8ab74..014561df0 100644 --- a/apps/token-e2e/src/integration/flow/governance-flow.cy.js +++ b/apps/token-e2e/src/integration/flow/governance-flow.cy.js @@ -734,6 +734,7 @@ context( function () { const proposalTitle = generateProposalTitle(); + cy.vega_wallet_teardown(); cy.ensure_specified_unstaked_tokens_are_associated( this.minProposerBalance ); @@ -741,7 +742,6 @@ context( cy.enter_unique_freeform_proposal_body('50', proposalTitle); cy.get(newProposalSubmitButton).should('be.visible').click(); cy.wait_for_proposal_submitted(); - cy.wait_for_proposal_sync(); cy.staking_page_disassociate_tokens('0.0001'); cy.get(vegaWallet).within(() => { cy.get(vegaWalletAssociatedBalance, txTimeout).should( diff --git a/apps/token-e2e/src/support/governance.functions.js b/apps/token-e2e/src/support/governance.functions.js index acfae0278..35ed6990c 100644 --- a/apps/token-e2e/src/support/governance.functions.js +++ b/apps/token-e2e/src/support/governance.functions.js @@ -1,5 +1,6 @@ const newProposalButton = '[data-testid="new-proposal-link"]'; const proposalInformationTableRows = '[data-testid="key-value-table-row"]'; +const proposalListItem = '[data-testid="proposals-list-item"]'; const newProposalTitle = '[data-testid="proposal-title"]'; const newProposalDescription = '[data-testid="proposal-description"]'; const proposalDetails = '[data-testid="proposal-details"]'; @@ -87,8 +88,7 @@ Cypress.Commands.add( Cypress.Commands.add('get_proposal_id_from_list', (proposalTitle) => { cy.contains(proposalTitle) - .parent() - .parent() + .parentsUntil(proposalListItem) .within(() => { cy.get(proposalDetails) .invoke('text')