From caa2d83247fcd245cbe0aabb1a106ca17da5d2d6 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com> Date: Sun, 19 Jan 2025 02:34:05 -0800 Subject: [PATCH 01/12] Update staging hosts --- frontend/proxy.conf.staging.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/proxy.conf.staging.js b/frontend/proxy.conf.staging.js index e24662038..e6f33698b 100644 --- a/frontend/proxy.conf.staging.js +++ b/frontend/proxy.conf.staging.js @@ -3,8 +3,8 @@ const fs = require('fs'); let PROXY_CONFIG = require('./proxy.conf'); PROXY_CONFIG.forEach(entry => { - entry.target = entry.target.replace("mempool.space", "mempool-staging.fra.mempool.space"); - entry.target = entry.target.replace("liquid.network", "liquid-staging.fra.mempool.space"); + entry.target = entry.target.replace("mempool.space", "node201.fmt.mempool.space"); + entry.target = entry.target.replace("liquid.network", "liquid-staging.fmt.mempool.space"); }); module.exports = PROXY_CONFIG; From 671b5ea2f2eb3ce9515a233702c5b784093f77c1 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 12:24:26 -0800 Subject: [PATCH 02/12] Reroute testnet4 tests to a different server --- .github/workflows/ci.yml | 1 + frontend/proxy.conf.staging.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a29e9184..767cf2694 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -327,6 +327,7 @@ jobs: browser: "chrome" ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}" env: + CYPRESS_REROUTE_TESTNET: ${{ matrix.spec == 'cypress/e2e/testnet4/*.spec.ts' }} COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/frontend/proxy.conf.staging.js b/frontend/proxy.conf.staging.js index e6f33698b..eda7d2b9d 100644 --- a/frontend/proxy.conf.staging.js +++ b/frontend/proxy.conf.staging.js @@ -3,7 +3,8 @@ const fs = require('fs'); let PROXY_CONFIG = require('./proxy.conf'); PROXY_CONFIG.forEach(entry => { - entry.target = entry.target.replace("mempool.space", "node201.fmt.mempool.space"); + const hostname = process.env.CYPRESS_REROUTE_TESTNET ? 'node201.fmt.mempool.space' : 'mempool-staging.fra.mempool.space'; + entry.target = entry.target.replace("mempool.space", hostname); entry.target = entry.target.replace("liquid.network", "liquid-staging.fmt.mempool.space"); }); From 34099e386112b781d7b70ca886f35cab8d23d969 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 12:32:37 -0800 Subject: [PATCH 03/12] Stop switching to testnet4 until we can check for the proxied server --- frontend/cypress/e2e/mainnet/mainnet.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/cypress/e2e/mainnet/mainnet.spec.ts b/frontend/cypress/e2e/mainnet/mainnet.spec.ts index a1082b769..7e17c09cd 100644 --- a/frontend/cypress/e2e/mainnet/mainnet.spec.ts +++ b/frontend/cypress/e2e/mainnet/mainnet.spec.ts @@ -344,7 +344,9 @@ describe('Mainnet', () => { cy.visit('/'); cy.waitForSkeletonGone(); - cy.changeNetwork('testnet4'); + //TODO(knorrium): add a check for the proxied server + // cy.changeNetwork('testnet4'); + cy.changeNetwork('signet'); cy.changeNetwork('mainnet'); }); From 7e766cc28db6e67386aab486a5d2e4e35eb3fda1 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 12:36:20 -0800 Subject: [PATCH 04/12] Change spec test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 767cf2694..af05a2448 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -327,7 +327,7 @@ jobs: browser: "chrome" ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}" env: - CYPRESS_REROUTE_TESTNET: ${{ matrix.spec == 'cypress/e2e/testnet4/*.spec.ts' }} + CYPRESS_REROUTE_TESTNET: ${{ contains(matrix.spec, 'testnet') }} COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 517a30d2b0e76c6a88e25b0e0d4c4dfc61597038 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 13:25:29 -0800 Subject: [PATCH 05/12] Split module and spec matrix --- .github/workflows/ci.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af05a2448..594df2a9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -252,16 +252,23 @@ jobs: fail-fast: false matrix: module: ["mempool", "liquid"] + spec: + - "cypress/e2e/mainnet/*.spec.ts" + - "cypress/e2e/signet/*.spec.ts" + - "cypress/e2e/testnet4/*.spec.ts" + - "cypress/e2e/liquid/liquid.spec.ts" + - "cypress/e2e/liquidtestnet/liquidtestnet.spec.ts" include: - module: "mempool" - spec: | - cypress/e2e/mainnet/*.spec.ts - cypress/e2e/signet/*.spec.ts - cypress/e2e/testnet4/*.spec.ts + spec: "cypress/e2e/mainnet/*.spec.ts" + - module: "mempool" + spec: "cypress/e2e/signet/*.spec.ts" + - module: "mempool" + spec: "cypress/e2e/testnet4/*.spec.ts" - module: "liquid" - spec: | - cypress/e2e/liquid/liquid.spec.ts - cypress/e2e/liquidtestnet/liquidtestnet.spec.ts + spec: "cypress/e2e/liquid/liquid.spec.ts" + - module: "liquid" + spec: "cypress/e2e/liquidtestnet/liquidtestnet.spec.ts" name: E2E tests for ${{ matrix.module }} steps: From e9e8b0c758c476e705a5696268808838a7c3ff58 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 13:38:06 -0800 Subject: [PATCH 06/12] Use testnet as a matrix config instead --- .github/workflows/ci.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 594df2a9f..7cff27841 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -251,24 +251,19 @@ jobs: strategy: fail-fast: false matrix: - module: ["mempool", "liquid"] - spec: - - "cypress/e2e/mainnet/*.spec.ts" - - "cypress/e2e/signet/*.spec.ts" - - "cypress/e2e/testnet4/*.spec.ts" - - "cypress/e2e/liquid/liquid.spec.ts" - - "cypress/e2e/liquidtestnet/liquidtestnet.spec.ts" + module: ["mempool", "liquid", "testnet4"] include: - module: "mempool" - spec: "cypress/e2e/mainnet/*.spec.ts" - - module: "mempool" - spec: "cypress/e2e/signet/*.spec.ts" - - module: "mempool" - spec: "cypress/e2e/testnet4/*.spec.ts" + spec: | + cypress/e2e/mainnet/*.spec.ts + cypress/e2e/signet/*.spec.ts + - module: "testnet4" + spec: | + cypress/e2e/testnet4/*.spec.ts - module: "liquid" - spec: "cypress/e2e/liquid/liquid.spec.ts" - - module: "liquid" - spec: "cypress/e2e/liquidtestnet/liquidtestnet.spec.ts" + spec: | + cypress/e2e/liquid/liquid.spec.ts + cypress/e2e/liquidtestnet/liquidtestnet.spec.ts name: E2E tests for ${{ matrix.module }} steps: @@ -334,7 +329,7 @@ jobs: browser: "chrome" ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}" env: - CYPRESS_REROUTE_TESTNET: ${{ contains(matrix.spec, 'testnet') }} + CYPRESS_REROUTE_TESTNET: ${{ contains(matrix.spec, 'testnet4') }} COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7f6399093eafa5aeb74aa81ab2b136502c76bd6e Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 13:56:16 -0800 Subject: [PATCH 07/12] Fix YAML --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cff27841..784a02afc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -258,8 +258,8 @@ jobs: cypress/e2e/mainnet/*.spec.ts cypress/e2e/signet/*.spec.ts - module: "testnet4" - spec: | - cypress/e2e/testnet4/*.spec.ts + spec: | + cypress/e2e/testnet4/*.spec.ts - module: "liquid" spec: | cypress/e2e/liquid/liquid.spec.ts From f59e95fcc8419426550be6bad69c6507e87179c4 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 14:11:41 -0800 Subject: [PATCH 08/12] Run the default mempool config if we are running testnet4 tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 784a02afc..146372f40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -318,7 +318,7 @@ jobs: with: tag: ${{ github.event_name }} working-directory: ${{ matrix.module }}/frontend - build: npm run config:defaults:${{ matrix.module }} + build: ${{ matrix.module == 'testnet4' && 'npm run config:defaults:mempool' || 'npm run config:defaults:${{ matrix.module }}' }} start: npm run start:local-staging wait-on: "http://localhost:4200" wait-on-timeout: 120 From 1098d2fe3c44b83624d3e17cda2ea73643d3dcf8 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 14:21:23 -0800 Subject: [PATCH 09/12] Change build step to shell script --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 146372f40..ac5326323 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -318,7 +318,12 @@ jobs: with: tag: ${{ github.event_name }} working-directory: ${{ matrix.module }}/frontend - build: ${{ matrix.module == 'testnet4' && 'npm run config:defaults:mempool' || 'npm run config:defaults:${{ matrix.module }}' }} + build: | + if [[ "${{ matrix.module }}" == "testnet4" ]]; then + npm run config:defaults:mempool + else + npm run config:defaults:${{ matrix.module }} + fi start: npm run start:local-staging wait-on: "http://localhost:4200" wait-on-timeout: 120 From 3d1aacbd66e69f830a6b0034577fa284696dd2ff Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 19:21:02 -0800 Subject: [PATCH 10/12] Copypasta matrix for tests --- .github/workflows/ci.yml | 80 +++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac5326323..6d2fc387f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -252,18 +252,6 @@ jobs: fail-fast: false matrix: module: ["mempool", "liquid", "testnet4"] - include: - - module: "mempool" - spec: | - cypress/e2e/mainnet/*.spec.ts - cypress/e2e/signet/*.spec.ts - - module: "testnet4" - spec: | - cypress/e2e/testnet4/*.spec.ts - - module: "liquid" - spec: | - cypress/e2e/liquid/liquid.spec.ts - cypress/e2e/liquidtestnet/liquidtestnet.spec.ts name: E2E tests for ${{ matrix.module }} steps: @@ -312,29 +300,77 @@ jobs: - name: Unzip assets before building (src/resources) run: unzip -o promo-video-assets.zip -d ${{ matrix.module }}/frontend/src/resources/promo-video - + + # mempool - name: Chrome browser tests (${{ matrix.module }}) + if: ${{ matrix.module == 'mempool' }} uses: cypress-io/github-action@v5 with: tag: ${{ github.event_name }} working-directory: ${{ matrix.module }}/frontend - build: | - if [[ "${{ matrix.module }}" == "testnet4" ]]; then - npm run config:defaults:mempool - else - npm run config:defaults:${{ matrix.module }} - fi + build: npm run config:defaults:${{ matrix.module }} start: npm run start:local-staging wait-on: "http://localhost:4200" wait-on-timeout: 120 record: true parallel: true - spec: ${{ matrix.spec }} + spec: | + cypress/e2e/mainnet/*.spec.ts + cypress/e2e/signet/*.spec.ts group: Tests on Chrome (${{ matrix.module }}) browser: "chrome" ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}" env: - CYPRESS_REROUTE_TESTNET: ${{ contains(matrix.spec, 'testnet4') }} + COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} + + # liquid + - name: Chrome browser tests (${{ matrix.module }}) + if: ${{ matrix.module == 'liquid' }} + uses: cypress-io/github-action@v5 + with: + tag: ${{ github.event_name }} + working-directory: ${{ matrix.module }}/frontend + build: npm run config:defaults:${{ matrix.module }} + start: npm run start:local-staging + wait-on: "http://localhost:4200" + wait-on-timeout: 120 + record: true + parallel: true + spec: | + cypress/e2e/liquid/liquid.spec.ts + cypress/e2e/liquidtestnet/liquidtestnet.spec.ts + group: Tests on Chrome (${{ matrix.module }}) + browser: "chrome" + ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}" + env: + COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} + + # testnet + - name: Chrome browser tests (${{ matrix.module }}) + if: ${{ matrix.module == 'testnet4' }} + uses: cypress-io/github-action@v5 + with: + tag: ${{ github.event_name }} + working-directory: ${{ matrix.module }}/frontend + build: npm run config:defaults:mempool + start: npm run start:local-staging + wait-on: "http://localhost:4200" + wait-on-timeout: 120 + record: true + parallel: true + spec: | + cypress/e2e/testnet4/*.spec.ts + group: Tests on Chrome (${{ matrix.module }}) + browser: "chrome" + ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}" + env: + CYPRESS_REROUTE_TESTNET: true COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -367,4 +403,4 @@ jobs: - name: Validate JSON syntax run: | cat mempool-config.json | jq - working-directory: docker/docker/backend + working-directory: docker/docker/backend \ No newline at end of file From 227d99e9909d1401867f3cb6258e2c4c4b05ead9 Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 19:35:08 -0800 Subject: [PATCH 11/12] Fix reroute logic --- frontend/proxy.conf.staging.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/proxy.conf.staging.js b/frontend/proxy.conf.staging.js index eda7d2b9d..260b222c0 100644 --- a/frontend/proxy.conf.staging.js +++ b/frontend/proxy.conf.staging.js @@ -3,7 +3,8 @@ const fs = require('fs'); let PROXY_CONFIG = require('./proxy.conf'); PROXY_CONFIG.forEach(entry => { - const hostname = process.env.CYPRESS_REROUTE_TESTNET ? 'node201.fmt.mempool.space' : 'mempool-staging.fra.mempool.space'; + const hostname = process.env.CYPRESS_REROUTE_TESTNET === 'true' ? 'mempool-staging.fra.mempool.space' : 'node201.fmt.mempool.space'; + console.log(`e2e tests running against ${hostname}`); entry.target = entry.target.replace("mempool.space", hostname); entry.target = entry.target.replace("liquid.network", "liquid-staging.fmt.mempool.space"); }); From 003956fd16caed93a243c37095cae48c667b544a Mon Sep 17 00:00:00 2001 From: Felipe Knorr Kuhn Date: Sun, 19 Jan 2025 19:48:12 -0800 Subject: [PATCH 12/12] Update staging hosts Add rerouting logic for testnet4 tests Split CI e2e workflow matrix into mempool, liquid and testnet4 --- .github/workflows/ci.yml | 72 ++++++++++++++++---- frontend/cypress/e2e/mainnet/mainnet.spec.ts | 4 +- frontend/proxy.conf.staging.js | 6 +- 3 files changed, 65 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a29e9184..6d2fc387f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -251,17 +251,7 @@ jobs: strategy: fail-fast: false matrix: - module: ["mempool", "liquid"] - include: - - module: "mempool" - spec: | - cypress/e2e/mainnet/*.spec.ts - cypress/e2e/signet/*.spec.ts - cypress/e2e/testnet4/*.spec.ts - - module: "liquid" - spec: | - cypress/e2e/liquid/liquid.spec.ts - cypress/e2e/liquidtestnet/liquidtestnet.spec.ts + module: ["mempool", "liquid", "testnet4"] name: E2E tests for ${{ matrix.module }} steps: @@ -310,8 +300,10 @@ jobs: - name: Unzip assets before building (src/resources) run: unzip -o promo-video-assets.zip -d ${{ matrix.module }}/frontend/src/resources/promo-video - + + # mempool - name: Chrome browser tests (${{ matrix.module }}) + if: ${{ matrix.module == 'mempool' }} uses: cypress-io/github-action@v5 with: tag: ${{ github.event_name }} @@ -322,7 +314,9 @@ jobs: wait-on-timeout: 120 record: true parallel: true - spec: ${{ matrix.spec }} + spec: | + cypress/e2e/mainnet/*.spec.ts + cypress/e2e/signet/*.spec.ts group: Tests on Chrome (${{ matrix.module }}) browser: "chrome" ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}" @@ -332,6 +326,56 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} + # liquid + - name: Chrome browser tests (${{ matrix.module }}) + if: ${{ matrix.module == 'liquid' }} + uses: cypress-io/github-action@v5 + with: + tag: ${{ github.event_name }} + working-directory: ${{ matrix.module }}/frontend + build: npm run config:defaults:${{ matrix.module }} + start: npm run start:local-staging + wait-on: "http://localhost:4200" + wait-on-timeout: 120 + record: true + parallel: true + spec: | + cypress/e2e/liquid/liquid.spec.ts + cypress/e2e/liquidtestnet/liquidtestnet.spec.ts + group: Tests on Chrome (${{ matrix.module }}) + browser: "chrome" + ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}" + env: + COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} + + # testnet + - name: Chrome browser tests (${{ matrix.module }}) + if: ${{ matrix.module == 'testnet4' }} + uses: cypress-io/github-action@v5 + with: + tag: ${{ github.event_name }} + working-directory: ${{ matrix.module }}/frontend + build: npm run config:defaults:mempool + start: npm run start:local-staging + wait-on: "http://localhost:4200" + wait-on-timeout: 120 + record: true + parallel: true + spec: | + cypress/e2e/testnet4/*.spec.ts + group: Tests on Chrome (${{ matrix.module }}) + browser: "chrome" + ci-build-id: "${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}" + env: + CYPRESS_REROUTE_TESTNET: true + COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} + validate_docker_json: if: "!contains(github.event.pull_request.labels.*.name, 'ops') && !contains(github.head_ref, 'ops/')" runs-on: "ubuntu-latest" @@ -359,4 +403,4 @@ jobs: - name: Validate JSON syntax run: | cat mempool-config.json | jq - working-directory: docker/docker/backend + working-directory: docker/docker/backend \ No newline at end of file diff --git a/frontend/cypress/e2e/mainnet/mainnet.spec.ts b/frontend/cypress/e2e/mainnet/mainnet.spec.ts index a1082b769..7e17c09cd 100644 --- a/frontend/cypress/e2e/mainnet/mainnet.spec.ts +++ b/frontend/cypress/e2e/mainnet/mainnet.spec.ts @@ -344,7 +344,9 @@ describe('Mainnet', () => { cy.visit('/'); cy.waitForSkeletonGone(); - cy.changeNetwork('testnet4'); + //TODO(knorrium): add a check for the proxied server + // cy.changeNetwork('testnet4'); + cy.changeNetwork('signet'); cy.changeNetwork('mainnet'); }); diff --git a/frontend/proxy.conf.staging.js b/frontend/proxy.conf.staging.js index e24662038..260b222c0 100644 --- a/frontend/proxy.conf.staging.js +++ b/frontend/proxy.conf.staging.js @@ -3,8 +3,10 @@ const fs = require('fs'); let PROXY_CONFIG = require('./proxy.conf'); PROXY_CONFIG.forEach(entry => { - entry.target = entry.target.replace("mempool.space", "mempool-staging.fra.mempool.space"); - entry.target = entry.target.replace("liquid.network", "liquid-staging.fra.mempool.space"); + const hostname = process.env.CYPRESS_REROUTE_TESTNET === 'true' ? 'mempool-staging.fra.mempool.space' : 'node201.fmt.mempool.space'; + console.log(`e2e tests running against ${hostname}`); + entry.target = entry.target.replace("mempool.space", hostname); + entry.target = entry.target.replace("liquid.network", "liquid-staging.fmt.mempool.space"); }); module.exports = PROXY_CONFIG;