diff --git a/apps/governance-e2e/src/integration/flow/proposal-details.cy.ts b/apps/governance-e2e/src/integration/flow/proposal-details.cy.ts index c3a1a01ce..2250a40b2 100644 --- a/apps/governance-e2e/src/integration/flow/proposal-details.cy.ts +++ b/apps/governance-e2e/src/integration/flow/proposal-details.cy.ts @@ -38,6 +38,10 @@ import { createSuccessorMarketProposalTxBody, } from '../../support/proposal.functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach, describe } from 'mocha'; + const proposalListItem = '[data-testid="proposals-list-item"]'; const participationNotMet = 'token-participation-not-met'; const voteStatus = 'vote-status'; @@ -323,6 +327,7 @@ describe( }); }); cy.VegaWalletSubmitProposal( + // @ts-ignore this is any createSuccessorMarketProposalTxBody(this.parentMarketId) ); navigateTo(navigation.proposals); @@ -334,6 +339,7 @@ describe( cy.getByTestId(proposalTermsToggle).click(); cy.get('.language-json').within(() => { cy.get('.hljs-attr').should('contain.text', 'parentMarketId'); + // @ts-ignore this is any cy.get('.hljs-string').should('contain.text', this.parentMarketId); cy.get('.hljs-attr').should('contain.text', 'insurancePoolFraction'); cy.get('.hljs-string').should('contain.text', '0.75'); @@ -352,6 +358,7 @@ describe( validateProposalDetailsDiff( 'Parent Market ID', proposalChangeType.ADDED, + // @ts-ignore this is any this.parentMarketId ); validateProposalDetailsDiff( @@ -450,6 +457,7 @@ describe( const closingTimestamp = createTenDigitUnixTimeStampForSpecifiedDays(2); submitUniqueRawProposal({ proposalBody: proposalPath, + // @ts-ignore this is any updateMarketId: this.parentMarketId, enactmentTimestamp: enactmentTimestamp, closingTimestamp: closingTimestamp, @@ -466,6 +474,7 @@ describe( cy.getByTestId('proposal-update-market-state').within(() => { getProposalInformationFromTable('Market ID') .invoke('text') + // @ts-ignore this is any .and('eq', this.parentMarketId); }); }); @@ -476,6 +485,7 @@ describe( const closingTimestamp = createTenDigitUnixTimeStampForSpecifiedDays(2); submitUniqueRawProposal({ proposalBody: proposalPath, + // @ts-ignore this is any updateMarketId: this.parentMarketId, enactmentTimestamp: enactmentTimestamp, closingTimestamp: closingTimestamp, @@ -489,6 +499,7 @@ describe( cy.getByTestId('proposal-update-market-state').within(() => { getProposalInformationFromTable('Market ID') .invoke('text') + // @ts-ignore this is any .and('eq', this.parentMarketId); }); }); @@ -499,6 +510,7 @@ describe( const closingTimestamp = createTenDigitUnixTimeStampForSpecifiedDays(2); submitUniqueRawProposal({ proposalBody: proposalPath, + // @ts-ignore this is any updateMarketId: this.parentMarketId, enactmentTimestamp: enactmentTimestamp, closingTimestamp: closingTimestamp, @@ -518,6 +530,7 @@ describe( cy.getByTestId('proposal-update-market-state').within(() => { getProposalInformationFromTable('Market ID') .invoke('text') + // @ts-ignore this is any .and('eq', this.parentMarketId); getProposalDetailsValue('Termination Price').should( 'contain.text', diff --git a/apps/governance-e2e/src/integration/flow/proposal-enacted.cy.ts b/apps/governance-e2e/src/integration/flow/proposal-enacted.cy.ts index e805f3b75..9cb798f5a 100644 --- a/apps/governance-e2e/src/integration/flow/proposal-enacted.cy.ts +++ b/apps/governance-e2e/src/integration/flow/proposal-enacted.cy.ts @@ -18,6 +18,10 @@ import { ensureSpecifiedUnstakedTokensAreAssociated } from '../../support/stakin import { ethereumWalletConnect } from '../../support/wallet-eth.functions'; import { vegaWalletSetSpecifiedApprovalAmount } from '../../support/wallet-functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach } from 'mocha'; + const proposalListItem = '[data-testid="proposals-list-item"]'; const closedProposals = 'closed-proposals'; const proposalStatus = 'proposal-status'; diff --git a/apps/governance-e2e/src/integration/flow/proposal-flow.cy.ts b/apps/governance-e2e/src/integration/flow/proposal-flow.cy.ts index 4b16a2793..28c6adced 100644 --- a/apps/governance-e2e/src/integration/flow/proposal-flow.cy.ts +++ b/apps/governance-e2e/src/integration/flow/proposal-flow.cy.ts @@ -36,6 +36,10 @@ import { import { ethereumWalletConnect } from '../../support/wallet-eth.functions'; import type { testFreeformProposal } from '../../support/common-interfaces'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach } from 'mocha'; + const vegaWalletStakedBalances = 'vega-wallet-balance-staked-validators'; const vegaWalletAssociatedBalance = 'associated-amount'; const vegaWalletNameElement = 'wallet-name'; @@ -301,6 +305,7 @@ context( cy.getByTestId(voteButtons).should('not.exist'); cy.getByTestId('min-proposal-requirements').should( 'have.text', + // @ts-ignore this is any `You must have at least ${this.minVoterBalance} VEGA associated to vote on this proposal` ); }); diff --git a/apps/governance-e2e/src/integration/flow/proposal-forms.cy.ts b/apps/governance-e2e/src/integration/flow/proposal-forms.cy.ts index fafc7f5a1..f53989bac 100644 --- a/apps/governance-e2e/src/integration/flow/proposal-forms.cy.ts +++ b/apps/governance-e2e/src/integration/flow/proposal-forms.cy.ts @@ -30,6 +30,10 @@ import { vegaWalletTeardown, } from '../../support/wallet-functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach, it } from 'mocha'; + const proposalListItem = '[data-testid="proposals-list-item"]'; const openProposals = 'open-proposals'; const proposalType = 'proposal-type'; diff --git a/apps/governance-e2e/src/integration/flow/proposal-list.cy.ts b/apps/governance-e2e/src/integration/flow/proposal-list.cy.ts index 59d1b88da..ecde4eb65 100644 --- a/apps/governance-e2e/src/integration/flow/proposal-list.cy.ts +++ b/apps/governance-e2e/src/integration/flow/proposal-list.cy.ts @@ -33,6 +33,10 @@ const voteMajorityNotMet = 'token-majority-not-met'; const voteMajorityMet = 'token-majority-met'; const votesForPercentage = 'votes-for-percentage'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach, describe, it } from 'mocha'; + describe('Governance flow for proposal list', { tags: '@slow' }, function () { before('connect wallets and set approval limit', function () { vegaWalletSetSpecifiedApprovalAmount('1000'); diff --git a/apps/governance-e2e/src/integration/flow/staking-flow.cy.ts b/apps/governance-e2e/src/integration/flow/staking-flow.cy.ts index f41bab520..ef2d4bf06 100644 --- a/apps/governance-e2e/src/integration/flow/staking-flow.cy.ts +++ b/apps/governance-e2e/src/integration/flow/staking-flow.cy.ts @@ -26,6 +26,10 @@ import { vegaWalletTeardown, } from '../../support/wallet-functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach, describe, it } from 'mocha'; + const stakeValidatorListTotalStake = 'total-stake'; const stakeValidatorListTotalShare = 'total-stake-share'; const stakeValidatorListStakePercentage = 'stake-percentage'; diff --git a/apps/governance-e2e/src/integration/flow/token-association-flow.cy.ts b/apps/governance-e2e/src/integration/flow/token-association-flow.cy.ts index 540dc87fb..a87c3297b 100644 --- a/apps/governance-e2e/src/integration/flow/token-association-flow.cy.ts +++ b/apps/governance-e2e/src/integration/flow/token-association-flow.cy.ts @@ -21,6 +21,10 @@ import { vegaWalletTeardown, } from '../../support/wallet-functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach, describe, it } from 'mocha'; + const ethWalletContainer = 'ethereum-wallet'; const vegaWalletAssociatedBalance = 'currency-value'; const vegaWalletUnstakedBalance = 'vega-wallet-balance-unstaked'; diff --git a/apps/governance-e2e/src/integration/flow/withdrawal-flow.cy.ts b/apps/governance-e2e/src/integration/flow/withdrawal-flow.cy.ts index 61a469e87..ffcc5aacb 100644 --- a/apps/governance-e2e/src/integration/flow/withdrawal-flow.cy.ts +++ b/apps/governance-e2e/src/integration/flow/withdrawal-flow.cy.ts @@ -7,6 +7,10 @@ import { import { ethereumWalletConnect } from '../../support/wallet-eth.functions'; import { depositAsset } from '../../support/wallet-functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach, it } from 'mocha'; + const withdraw = 'withdraw'; const withdrawalForm = 'withdraw-form'; const ethAddressInput = 'eth-address-input'; 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 edd20d669..d56f9c0bb 100644 --- a/apps/governance-e2e/src/integration/view/pubkey-view.cy.ts +++ b/apps/governance-e2e/src/integration/view/pubkey-view.cy.ts @@ -12,6 +12,10 @@ import { } from '../../support/governance.functions'; import { vegaWalletFaucetAssetsWithoutCheck } from '../../support/wallet-functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach, it } from 'mocha'; + const vegaWalletPubKey = Cypress.env('vegaWalletPublicKey2'); const vegaPubkeyTruncated = Cypress.env('vegaWalletPublicKey2Short'); const banner = 'view-banner'; diff --git a/apps/governance-e2e/src/integration/view/rewards.cy.ts b/apps/governance-e2e/src/integration/view/rewards.cy.ts index 6100f9838..02fa1c2d8 100644 --- a/apps/governance-e2e/src/integration/view/rewards.cy.ts +++ b/apps/governance-e2e/src/integration/view/rewards.cy.ts @@ -5,6 +5,11 @@ import { } from '../../support/common.functions'; import { waitForBeginningOfEpoch } from '../../support/staking.functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, describe, it } from 'mocha'; +import { expect } from 'chai'; + const viewToggle = 'epoch-reward-view-toggle-total'; const warning = 'callout'; diff --git a/apps/governance-e2e/src/integration/view/validators.cy.ts b/apps/governance-e2e/src/integration/view/validators.cy.ts index 496a29069..6d3f4f49e 100644 --- a/apps/governance-e2e/src/integration/view/validators.cy.ts +++ b/apps/governance-e2e/src/integration/view/validators.cy.ts @@ -12,6 +12,10 @@ import { } from '../../support/staking.functions'; import { previousEpochData } from '../../fixtures/mocks/previous-epoch'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { before, beforeEach, describe, it } from 'mocha'; + const guideLink = 'staking-guide-link'; const validatorTitle = 'validator-node-title'; const validatorId = 'validator-id'; diff --git a/apps/governance-e2e/src/integration/view/wallet-eth.cy.ts b/apps/governance-e2e/src/integration/view/wallet-eth.cy.ts index 503ee7e1b..f03440daf 100644 --- a/apps/governance-e2e/src/integration/view/wallet-eth.cy.ts +++ b/apps/governance-e2e/src/integration/view/wallet-eth.cy.ts @@ -1,6 +1,11 @@ import { convertTokenValueToNumber } from '../../support/common.functions'; import { ethereumWalletConnect } from '../../support/wallet-eth.functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { describe, before } from 'mocha'; +import { expect } from 'chai'; + const walletContainer = 'aside [data-testid="ethereum-wallet"]'; const walletHeader = '[data-testid="wallet-header"] h1'; const connectToEthButton = diff --git a/apps/governance-e2e/src/integration/view/wallet-vega.cy.ts b/apps/governance-e2e/src/integration/view/wallet-vega.cy.ts index 942490c08..2cae9d0eb 100644 --- a/apps/governance-e2e/src/integration/view/wallet-vega.cy.ts +++ b/apps/governance-e2e/src/integration/view/wallet-vega.cy.ts @@ -5,6 +5,11 @@ import { vegaWalletTeardown, } from '../../support/wallet-functions'; +// For some reason in this the below imports are typed as the jest version, importing +// them directly is an easy work around. +import { it } from 'mocha'; +import { expect } from 'chai'; + const walletContainer = 'aside [data-testid="vega-wallet"]'; const walletHeader = '[data-testid="wallet-header"] h1'; const connectButton = 'connect-vega-wallet';