From e984ea8e2a4e12ef5dbfc51b2442f8ea6f4ccb9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Szpiech?= Date: Mon, 17 Oct 2022 16:11:13 +0200 Subject: [PATCH] chore: change tests to use stagnet3 by default (#1760) --- .github/actions/setup-vegawallet/action.yml | 4 +-- .../capsule-cypress-manual-trigger.yml | 2 +- .../workflows/capsule-cypress-night-run.yml | 2 +- .github/workflows/capsule-cypress.yml | 2 +- apps/console-lite-e2e/.env | 32 ++++--------------- apps/console-lite/.env.stagnet3 | 2 +- apps/stats-e2e/.env | 4 +-- apps/trading-e2e/.env | 13 +++++++- .../src/integration/market-summary.cy.ts | 2 +- .../src/integration/trading-deal-ticket.cy.ts | 2 +- 10 files changed, 29 insertions(+), 36 deletions(-) diff --git a/.github/actions/setup-vegawallet/action.yml b/.github/actions/setup-vegawallet/action.yml index dcb92bfd3..015f5133a 100644 --- a/.github/actions/setup-vegawallet/action.yml +++ b/.github/actions/setup-vegawallet/action.yml @@ -32,12 +32,12 @@ runs: - name: Import fairground network shell: bash if: ${{ inputs.capsule==false }} - run: vegawallet network import --from-url="https://raw.githubusercontent.com/vegaprotocol/networks-internal/master/fairground/vegawallet-fairground.toml" --force --home ~/.vegacapsule/testnet/wallet + run: vegawallet network import --from-url="https://raw.githubusercontent.com/vegaprotocol/networks-internal/master/stagnet3/stagnet3.toml" --force --home ~/.vegacapsule/testnet/wallet - name: Start service using fairground network shell: bash if: ${{ inputs.capsule==false }} - run: vegawallet service run --network fairground --automatic-consent --no-version-check --home ~/.vegacapsule/testnet/wallet & + run: vegawallet service run --network stagnet3 --automatic-consent --no-version-check --home ~/.vegacapsule/testnet/wallet & - name: Start service using capsule network shell: bash diff --git a/.github/workflows/capsule-cypress-manual-trigger.yml b/.github/workflows/capsule-cypress-manual-trigger.yml index 27e0485ca..131b6c048 100644 --- a/.github/workflows/capsule-cypress-manual-trigger.yml +++ b/.github/workflows/capsule-cypress-manual-trigger.yml @@ -33,7 +33,7 @@ jobs: env: GO111MODULE: 'on' GOBIN: /home/runner/go/bin - VEGA_VERSION: 'v0.57.0' + VEGA_VERSION: 'v0.58.0' steps: ####### ## Setup flags diff --git a/.github/workflows/capsule-cypress-night-run.yml b/.github/workflows/capsule-cypress-night-run.yml index 7b1bcdda4..2bccebd0b 100644 --- a/.github/workflows/capsule-cypress-night-run.yml +++ b/.github/workflows/capsule-cypress-night-run.yml @@ -15,7 +15,7 @@ jobs: env: GO111MODULE: 'on' GOBIN: /home/runner/go/bin - VEGA_VERSION: 'v0.57.0' + VEGA_VERSION: 'v0.58.0' RUN_CAPSULE: true steps: ####### diff --git a/.github/workflows/capsule-cypress.yml b/.github/workflows/capsule-cypress.yml index 1f9a11dcb..0426f3205 100644 --- a/.github/workflows/capsule-cypress.yml +++ b/.github/workflows/capsule-cypress.yml @@ -20,7 +20,7 @@ jobs: env: GO111MODULE: 'on' GOBIN: /home/runner/go/bin - VEGA_VERSION: 'v0.57.0' + VEGA_VERSION: 'v0.58.0' steps: ####### ## Setup langs diff --git a/apps/console-lite-e2e/.env b/apps/console-lite-e2e/.env index e4c17e23c..78d94c5f7 100644 --- a/apps/console-lite-e2e/.env +++ b/apps/console-lite-e2e/.env @@ -1,26 +1,8 @@ -# React Environment Variables - -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables - -# https://www.netlify.com/docs/continuous-deployment/#environment-variables - -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - -NX_VEGA_URL=https://api.n06.testnet.vega.xyz/graphql -NX_VEGA_ENV=TESTNET +# App configuration variables +NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_URL=https://api.n01.stagnet3.vega.xyz/graphql +NX_VEGA_ENV=STAGNET3 +NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://sepolia.etherscan.io +NX_VEGA_EXPLORER_URL=https://stagnet3.explorer.vega.xyz NX_VEGA_WALLET_URL=http://localhost:1789 diff --git a/apps/console-lite/.env.stagnet3 b/apps/console-lite/.env.stagnet3 index 7e05de2fd..22108002d 100644 --- a/apps/console-lite/.env.stagnet3 +++ b/apps/console-lite/.env.stagnet3 @@ -4,4 +4,4 @@ NX_VEGA_URL=https://api.n01.stagnet3.vega.xyz/graphql NX_VEGA_ENV=STAGNET3 NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 NX_ETHERSCAN_URL=https://sepolia.etherscan.io -NX_VEGA_EXPLORER_URL=https://staging2.explorer.vega.xyz +NX_VEGA_EXPLORER_URL=https://stagnet3.explorer.vega.xyz diff --git a/apps/stats-e2e/.env b/apps/stats-e2e/.env index 9e19154ea..b63130085 100644 --- a/apps/stats-e2e/.env +++ b/apps/stats-e2e/.env @@ -1,3 +1,3 @@ # App configuration variables -NX_VEGA_ENV=TESTNET -CYPRESS_VEGA_ENV=TESTNET +NX_VEGA_ENV=STAGNET3 +CYPRESS_VEGA_ENV=STAGNET3 diff --git a/apps/trading-e2e/.env b/apps/trading-e2e/.env index da2779e57..0f9ed6893 100644 --- a/apps/trading-e2e/.env +++ b/apps/trading-e2e/.env @@ -1,2 +1,13 @@ NX_VEGA_WALLET_URL=http://localhost:1789 -CYPRESS_VEGA_URL=https://api.n06.testnet.vega.xyz/graphql +NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 +NX_ETHERSCAN_URL=https://sepolia.etherscan.io +NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz +NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_ENV=STAGNET3 +NX_VEGA_EXPLORER_URL=https://staging3.explorer.vega.xyz +NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"} +NX_VEGA_TOKEN_URL=https://token.fairground.wtf +NX_VEGA_URL=https://api.n01.stagnet3.vega.xyz/graphql +NX_VEGA_WALLET_URL=http://localhost:1789 +CYPRESS_VEGA_URL=https://api.n01.stagnet3.vega.xyz/graphql +CYPRESS_EXPLORER_URL=https://staging3.explorer.vega.xyz \ No newline at end of file diff --git a/apps/trading-e2e/src/integration/market-summary.cy.ts b/apps/trading-e2e/src/integration/market-summary.cy.ts index ed8c06502..a47e75883 100644 --- a/apps/trading-e2e/src/integration/market-summary.cy.ts +++ b/apps/trading-e2e/src/integration/market-summary.cy.ts @@ -113,7 +113,7 @@ describe('Market trading page', () => { .within(() => { cy.getByTestId('link') .should('have.attr', 'href') - .and('include', 'https://explorer.fairground.wtf/'); + .and('include', Cypress.env('EXPLORER_URL')); }); }); diff --git a/apps/trading-e2e/src/integration/trading-deal-ticket.cy.ts b/apps/trading-e2e/src/integration/trading-deal-ticket.cy.ts index 728e153bd..c5c63889f 100644 --- a/apps/trading-e2e/src/integration/trading-deal-ticket.cy.ts +++ b/apps/trading-e2e/src/integration/trading-deal-ticket.cy.ts @@ -116,7 +116,7 @@ const testOrder = (order: Order, expected?: Partial) => { ); cy.getByTestId(orderTransactionHash) .invoke('attr', 'href') - .should('include', 'https://explorer.fairground.wtf/txs/0xtest-tx-hash'); + .should('include', `${Cypress.env('EXPLORER_URL')}/txs/0xtest-tx-hash`); cy.getByTestId('dialog-close').click(); };