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
This commit is contained in:
Joe Tsang 2022-12-16 17:18:39 +00:00 committed by GitHub
parent f133200c7f
commit e20061d921
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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(

View File

@ -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')