Merge pull request #727 from knorrium/improve_multisite_testing

Improve multisite testing
This commit is contained in:
softsimon 2021-08-18 03:35:43 +03:00 committed by GitHub
commit 006442f9de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 702 additions and 639 deletions

View File

@ -15,17 +15,60 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: ${{ matrix.browser }} browser tests - name: ${{ matrix.browser }} browser tests (Mempool)
uses: cypress-io/github-action@v2 uses: cypress-io/github-action@v2
with: with:
working-directory: frontend working-directory: frontend
build: npm run config:defaults build: npm run config:defaults:mempool
start: npm run start:local-prod start: npm run start:local-prod
wait-on: 'http://localhost:4200' wait-on: 'http://localhost:4200'
wait-on-timeout: 120 wait-on-timeout: 120
record: true record: true
parallel: true parallel: true
group: Tests on ${{ matrix.browser }} env: BASE_MODULE=mempool
group: Tests on ${{ matrix.browser }} (Mempool)
browser: ${{ matrix.browser }}
ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
- name: ${{ matrix.browser }} browser tests (Liquid)
uses: cypress-io/github-action@v2
if: always()
with:
working-directory: frontend
build: npm run config:defaults:liquid
start: npm run start:local-prod
wait-on: 'http://localhost:4200'
wait-on-timeout: 120
record: true
parallel: true
spec: cypress/integration/liquid/liquid.spec.ts
env: BASE_MODULE=liquid
group: Tests on ${{ matrix.browser }} (Liquid)
browser: ${{ matrix.browser }}
ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
- name: ${{ matrix.browser }} browser tests (Bisq)
uses: cypress-io/github-action@v2
if: always()
with:
working-directory: frontend
build: npm run config:defaults:bisq
start: npm run start:local-prod
wait-on: 'http://localhost:4200'
wait-on-timeout: 120
record: true
parallel: true
spec: cypress/integration/bisq/bisq.spec.ts
env: BASE_MODULE=bisq
group: Tests on ${{ matrix.browser }} (Bisq)
browser: ${{ matrix.browser }} browser: ${{ matrix.browser }}
ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}' ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
env: env:

View File

@ -1,5 +1,8 @@
describe('Bisq', () => { describe('Bisq', () => {
let baseModule;
beforeEach(() => { beforeEach(() => {
baseModule = (Cypress.env('BASE_MODULE') && Cypress.env('BASE_MODULE') === 'bisq') ? '' : '/bisq';
cy.intercept('/sockjs-node/info*').as('socket'); cy.intercept('/sockjs-node/info*').as('socket');
cy.intercept('/bisq/api/markets/hloc?market=btc_usd&interval=day').as('hloc'); cy.intercept('/bisq/api/markets/hloc?market=btc_usd&interval=day').as('hloc');
cy.intercept('/bisq/api/markets/ticker').as('ticker'); cy.intercept('/bisq/api/markets/ticker').as('ticker');
@ -20,13 +23,15 @@ describe('Bisq', () => {
}); });
}); });
if (Cypress.env("BASE_MODULE") === '' || Cypress.env("BASE_MODULE") !== 'liquid') {
it('loads the dashboard', () => { it('loads the dashboard', () => {
cy.visit('/bisq'); cy.visit(`${baseModule}`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
}); });
it('loads the transactions screen', () => { it('loads the transactions screen', () => {
cy.visit('/bisq'); cy.visit(`${baseModule}`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('li:nth-of-type(2) > a').click().then(() => { cy.get('li:nth-of-type(2) > a').click().then(() => {
cy.get('.table > tr').should('have.length', 50); cy.get('.table > tr').should('have.length', 50);
@ -34,7 +39,7 @@ describe('Bisq', () => {
}); });
it('loads the blocks screen', () => { it('loads the blocks screen', () => {
cy.visit('/bisq'); cy.visit(`${baseModule}`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => { cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait('@blocks'); cy.wait('@blocks');
@ -43,7 +48,7 @@ describe('Bisq', () => {
}); });
it('loads the stats screen', () => { it('loads the stats screen', () => {
cy.visit('/bisq'); cy.visit(`${baseModule}`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('li:nth-of-type(4) > a').click().then(() => { cy.get('li:nth-of-type(4) > a').click().then(() => {
cy.wait('@stats'); cy.wait('@stats');
@ -51,7 +56,7 @@ describe('Bisq', () => {
}); });
it('loads the api screen', () => { it('loads the api screen', () => {
cy.visit('/bisq'); cy.visit(`${baseModule}`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('li:nth-of-type(5) > a').click().then(() => { cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('.card').should('have.length.at.least', 1); cy.get('.card').should('have.length.at.least', 1);
@ -62,26 +67,22 @@ describe('Bisq', () => {
it('shows blocks pagination with 5 pages (desktop)', () => { it('shows blocks pagination with 5 pages (desktop)', () => {
cy.viewport(760, 800); cy.viewport(760, 800);
cy.visit('/bisq'); cy.visit(`${baseModule}/blocks`);
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('tbody tr').should('have.length', 10); cy.get('tbody tr').should('have.length', 10);
// 5 pages + 4 buttons = 9 buttons // 5 pages + 4 buttons = 9 buttons
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 9); cy.get('.pagination-container ul.pagination').first().children().should('have.length', 9);
}); });
});
it('shows blocks pagination with 3 pages (mobile)', () => { it('shows blocks pagination with 3 pages (mobile)', () => {
cy.viewport(669, 800); cy.viewport(669, 800);
cy.visit('/bisq'); cy.visit(`${baseModule}/blocks`);
cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('tbody tr').should('have.length', 10); cy.get('tbody tr').should('have.length', 10);
// 3 pages + 4 buttons = 7 buttons // 3 pages + 4 buttons = 7 buttons
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 7); cy.get('.pagination-container ul.pagination').first().children().should('have.length', 7);
}); });
}); } else {
it.skip("Tests cannot be run on the selected BASE_MODULE");
}
}); });

View File

@ -1,5 +1,8 @@
describe('Liquid', () => { describe('Liquid', () => {
let baseModule;
beforeEach(() => { beforeEach(() => {
baseModule = (Cypress.env('BASE_MODULE') && Cypress.env('BASE_MODULE') === 'liquid') ? '' : '/liquid';
cy.intercept('/liquid/api/block/**').as('block'); cy.intercept('/liquid/api/block/**').as('block');
cy.intercept('/liquid/api/blocks/').as('blocks'); cy.intercept('/liquid/api/blocks/').as('blocks');
cy.intercept('/liquid/api/tx/**/outspends').as('outspends'); cy.intercept('/liquid/api/tx/**/outspends').as('outspends');
@ -13,28 +16,30 @@ describe('Liquid', () => {
}); });
}); });
if (Cypress.env("BASE_MODULE") === '' || Cypress.env("BASE_MODULE") !== 'bisq') {
it('loads the dashboard', () => { it('loads the dashboard', () => {
cy.visit('/liquid'); cy.visit(`${baseModule}`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
}); });
it('loads the blocks page', () => { it('loads the blocks page', () => {
cy.visit('/liquid/blocks'); cy.visit(`${baseModule}/blocks`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
}); });
it('loads a specific block page', () => { it('loads a specific block page', () => {
cy.visit('/liquid/block/7e1369a23a5ab861e7bdede2aadcccae4ea873ffd9caf11c7c5541eb5bcdff54'); cy.visit(`${baseModule}/block/7e1369a23a5ab861e7bdede2aadcccae4ea873ffd9caf11c7c5541eb5bcdff54`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
}); });
it('loads the graphs page', () => { it('loads the graphs page', () => {
cy.visit('/liquid/graphs'); cy.visit(`${baseModule}/graphs`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
}); });
it('loads the tv page - desktop', () => { it('loads the tv page - desktop', () => {
cy.visit('/liquid'); cy.visit(`${baseModule}`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => { cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.wait(1000); cy.wait(1000);
@ -42,7 +47,7 @@ describe('Liquid', () => {
}); });
it('loads the graphs page - mobile', () => { it('loads the graphs page - mobile', () => {
cy.visit('/liquid'); cy.visit(`${baseModule}`)
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('li:nth-of-type(3) > a').click().then(() => { cy.get('li:nth-of-type(3) > a').click().then(() => {
cy.viewport('iphone-6'); cy.viewport('iphone-6');
@ -53,52 +58,46 @@ describe('Liquid', () => {
describe('assets', () => { describe('assets', () => {
it('shows the assets screen', () => { it('shows the assets screen', () => {
cy.visit('/liquid'); cy.visit(`${baseModule}/assets`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('li:nth-of-type(5) > a').click().then(() => { cy.get('table tr').should('have.length.at.least', 5);
cy.get('table tr').should('have.length', 5);
});
}); });
it('allows searching assets', () => { it('allows searching assets', () => {
cy.visit('/liquid'); cy.visit(`${baseModule}/assets`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('li:nth-of-type(5) > a').click().then(() => {
cy.get('.container-xl input').click().type('Liquid Bitcoin').then(() => { cy.get('.container-xl input').click().type('Liquid Bitcoin').then(() => {
cy.get('table tr').should('have.length', 1); cy.get('table tr').should('have.length', 1);
}); });
}); });
});
it('shows a specific asset ID', () => { it('shows a specific asset ID', () => {
cy.visit('/liquid'); cy.visit(`${baseModule}/assets`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('li:nth-of-type(5) > a').click().then(() => { cy.get('.container-xl input').click().type('Liquid AUD').then(() => {
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
cy.get('table tr td:nth-of-type(1) a').click(); cy.get('table tr td:nth-of-type(1) a').click();
}); });
}); });
}); });
});
describe('unblinded TX', () => { describe('unblinded TX', () => {
it('show unblinded TX', () => { it('show unblinded TX', () => {
cy.visit('/liquid/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=100000,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,0ab9f70650f16b1db8dfada05237f7d0d65191c3a13183da8a2ddddfbde9a2ad,fd98b2edc5530d76acd553f206a431f4c1fab27e10e290ad719582af878e98fc,2364760,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,90c7a43b15b905bca045ca42a01271cfe71d2efe3133f4197792c24505cb32ed,12eb5959d9293b8842e7dd8bc9aa9639fd3fd031c5de3ba911adeca94eb57a3a'); cy.visit(`${baseModule}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=100000,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,0ab9f70650f16b1db8dfada05237f7d0d65191c3a13183da8a2ddddfbde9a2ad,fd98b2edc5530d76acd553f206a431f4c1fab27e10e290ad719582af878e98fc,2364760,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,90c7a43b15b905bca045ca42a01271cfe71d2efe3133f4197792c24505cb32ed,12eb5959d9293b8842e7dd8bc9aa9639fd3fd031c5de3ba911adeca94eb57a3a`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('#table-tx-vin tr').should('have.class', 'assetBox'); cy.get('#table-tx-vin tr').should('have.class', 'assetBox');
cy.get('#table-tx-vout tr').should('have.class', 'assetBox'); cy.get('#table-tx-vout tr').should('have.class', 'assetBox');
}); });
it('show empty unblinded TX', () => { it('show empty unblinded TX', () => {
cy.visit('/liquid/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded='); cy.visit(`${baseModule}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('#table-tx-vin tr').should('have.class', ''); cy.get('#table-tx-vin tr').should('have.class', '');
cy.get('#table-tx-vout tr').should('have.class', ''); cy.get('#table-tx-vout tr').should('have.class', '');
}); });
it('show invalid unblinded TX hex', () => { it('show invalid unblinded TX hex', () => {
cy.visit('/liquid/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=123'); cy.visit(`${baseModule}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=123`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('#table-tx-vin tr').should('have.class', ''); cy.get('#table-tx-vin tr').should('have.class', '');
cy.get('#table-tx-vout tr').should('have.class', ''); cy.get('#table-tx-vout tr').should('have.class', '');
@ -106,34 +105,36 @@ describe('Liquid', () => {
}); });
it('show first unblinded vout', () => { it('show first unblinded vout', () => {
cy.visit('/liquid/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=100000,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,0ab9f70650f16b1db8dfada05237f7d0d65191c3a13183da8a2ddddfbde9a2ad,fd98b2edc5530d76acd553f206a431f4c1fab27e10e290ad719582af878e98fc'); cy.visit(`${baseModule}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=100000,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,0ab9f70650f16b1db8dfada05237f7d0d65191c3a13183da8a2ddddfbde9a2ad,fd98b2edc5530d76acd553f206a431f4c1fab27e10e290ad719582af878e98fc`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('#table-tx-vout tr:first-child()').should('have.class', 'assetBox'); cy.get('#table-tx-vout tr:first-child()').should('have.class', 'assetBox');
}); });
it('show second unblinded vout', () => { it('show second unblinded vout', () => {
cy.visit('/liquid/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=2364760,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,90c7a43b15b905bca045ca42a01271cfe71d2efe3133f4197792c24505cb32ed,12eb5959d9293b8842e7dd8bc9aa9639fd3fd031c5de3ba911adeca94eb57a3a'); cy.visit(`${baseModule}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=2364760,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,90c7a43b15b905bca045ca42a01271cfe71d2efe3133f4197792c24505cb32ed,12eb5959d9293b8842e7dd8bc9aa9639fd3fd031c5de3ba911adeca94eb57a3a`);
cy.get('#table-tx-vout tr').should('have.class', 'assetBox'); cy.get('#table-tx-vout tr').should('have.class', 'assetBox');
}); });
it('show invalid error unblinded TX', () => { it('show invalid error unblinded TX', () => {
cy.visit('/liquid/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=100000,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,0ab9f70650f16b1db8dfada05237f7d0d65191c3a13183da8a2ddddfbde9a2ad,fd98b2edc5530d76acd553f206a431f4c1fab27e10e290ad719582af878e98fc,2364760,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,90c7a43b15b905bca045ca42a01271cfe71d2efe3133f4197792c24505cb32ed,12eb5959d9293b8842e7dd8bc9aa9639fd3fd031c5de3ba911adeca94eb57a3c'); cy.visit(`${baseModule}/tx/f2f41c0850e8e7e3f1af233161fd596662e67c11ef10ed15943884186fbb7f46#blinded=100000,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,0ab9f70650f16b1db8dfada05237f7d0d65191c3a13183da8a2ddddfbde9a2ad,fd98b2edc5530d76acd553f206a431f4c1fab27e10e290ad719582af878e98fc,2364760,6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d,90c7a43b15b905bca045ca42a01271cfe71d2efe3133f4197792c24505cb32ed,12eb5959d9293b8842e7dd8bc9aa9639fd3fd031c5de3ba911adeca94eb57a3c`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('#table-tx-vout tr').should('have.class', 'assetBox'); cy.get('#table-tx-vout tr').should('have.class', 'assetBox');
cy.get('.error-unblinded' ).contains('Error: Invalid blinding data.'); cy.get('.error-unblinded' ).contains('Error: Invalid blinding data.');
}); });
it('shows asset peg in/out and burn transactions', () => { it('shows asset peg in/out and burn transactions', () => {
cy.visit('/liquid/asset/6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d'); cy.visit(`${baseModule}/asset/6f0279e9ed041c3d710a9f57d0c02928416460c4b722ae3457a11eec381c526d`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('#table-tx-vout tr').not('.assetBox'); cy.get('#table-tx-vout tr').not('.assetBox');
cy.get('#table-tx-vin tr').not('.assetBox'); cy.get('#table-tx-vin tr').not('.assetBox');
}); });
it('prevents regressing issue #644', () => { it('prevents regressing issue #644', () => {
cy.visit('/liquid/tx/393b890966f305e7c440fcfb12a13f51a7a9011cc59ff5f14f6f93214261bd82'); cy.visit(`${baseModule}/tx/393b890966f305e7c440fcfb12a13f51a7a9011cc59ff5f14f6f93214261bd82`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
}); });
}); });
} else {
it.skip("Tests cannot be run on the selected BASE_MODULE");
}
}); });

View File

@ -15,6 +15,8 @@ describe('Mainnet', () => {
}); });
}); });
if (Cypress.env("BASE_MODULE") === '' || Cypress.env("BASE_MODULE") === 'mempool') {
it('loads the status screen', () => { it('loads the status screen', () => {
cy.visit('/status'); cy.visit('/status');
cy.get('#mempool-block-0').should('be.visible'); cy.get('#mempool-block-0').should('be.visible');
@ -315,4 +317,7 @@ describe('Mainnet', () => {
cy.get('.pagination-container ul.pagination').first().children().should('have.length', 7); cy.get('.pagination-container ul.pagination').first().children().should('have.length', 7);
}); });
}); });
} else {
it.skip("Tests cannot be run on the selected BASE_MODULE");
}
}); });

View File

@ -8,6 +8,8 @@ describe('Signet', () => {
cy.intercept('/api/tx/*/outspends').as('tx-outspends'); cy.intercept('/api/tx/*/outspends').as('tx-outspends');
}); });
if (Cypress.env("BASE_MODULE") === '' || Cypress.env("BASE_MODULE") === 'mempool') {
it('loads the dashboard', () => { it('loads the dashboard', () => {
cy.visit('/signet'); cy.visit('/signet');
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
@ -28,6 +30,7 @@ describe('Signet', () => {
"network": "signet" "network": "signet"
} }
}); });
cy.get(':nth-child(1) > #bitcoin-block-0').should('not.exist'); cy.get(':nth-child(1) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(2) > #bitcoin-block-0').should('not.exist'); cy.get(':nth-child(2) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist'); cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
@ -122,5 +125,7 @@ describe('Signet', () => {
}); });
}); });
}); });
} else {
it.skip("Tests cannot be run on the selected BASE_MODULE");
}
}); });

View File

@ -1,4 +1,4 @@
import { emitMempoolInfo } from "../../support/websocket"; import { confirmAddress, emitMempoolInfo, sendWsMock, showNewTx, startTrackingAddress } from "../../support/websocket";
describe('Testnet', () => { describe('Testnet', () => {
beforeEach(() => { beforeEach(() => {
@ -8,6 +8,8 @@ describe('Testnet', () => {
cy.intercept('/api/tx/*/outspends').as('tx-outspends'); cy.intercept('/api/tx/*/outspends').as('tx-outspends');
}); });
if (Cypress.env("BASE_MODULE") === '' || Cypress.env("BASE_MODULE") === 'mempool') {
it('loads the dashboard', () => { it('loads the dashboard', () => {
cy.visit('/testnet'); cy.visit('/testnet');
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
@ -15,7 +17,7 @@ describe('Testnet', () => {
it('loads the dashboard with the skeleton blocks', () => { it('loads the dashboard with the skeleton blocks', () => {
cy.mockMempoolSocket(); cy.mockMempoolSocket();
cy.visit("/signet"); cy.visit("/testnet");
cy.get(':nth-child(1) > #bitcoin-block-0').should('be.visible'); cy.get(':nth-child(1) > #bitcoin-block-0').should('be.visible');
cy.get(':nth-child(2) > #bitcoin-block-0').should('be.visible'); cy.get(':nth-child(2) > #bitcoin-block-0').should('be.visible');
cy.get(':nth-child(3) > #bitcoin-block-0').should('be.visible'); cy.get(':nth-child(3) > #bitcoin-block-0').should('be.visible');
@ -28,6 +30,7 @@ describe('Testnet', () => {
loaded: true loaded: true
} }
}); });
cy.get(':nth-child(1) > #bitcoin-block-0').should('not.exist'); cy.get(':nth-child(1) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(2) > #bitcoin-block-0').should('not.exist'); cy.get(':nth-child(2) > #bitcoin-block-0').should('not.exist');
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist'); cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
@ -119,4 +122,7 @@ describe('Testnet', () => {
}); });
}); });
}); });
} else {
it.skip("Tests cannot be run on the selected BASE_MODULE");
}
}); });

View File

@ -39,7 +39,9 @@
"lint": "ng lint", "lint": "ng lint",
"e2e": "npm run generate-config && ng e2e", "e2e": "npm run generate-config && ng e2e",
"e2e:ci": "npm run cypress:run:ci", "e2e:ci": "npm run cypress:run:ci",
"config:defaults": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 && npm run generate-config", "config:defaults:mempool": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 BASE_MODULE=mempool && npm run generate-config",
"config:defaults:liquid": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 BASE_MODULE=liquid && npm run generate-config",
"config:defaults:bisq": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 BASE_MODULE=bisq && npm run generate-config",
"dev:ssr": "npm run generate-config && ng run mempool:serve-ssr", "dev:ssr": "npm run generate-config && ng run mempool:serve-ssr",
"serve:ssr": "node server.run.js", "serve:ssr": "node server.run.js",
"build:ssr": "npm run build && ng run mempool:server:production && ./node_modules/typescript/bin/tsc server.run.ts", "build:ssr": "npm run build && ng run mempool:server:production && ./node_modules/typescript/bin/tsc server.run.ts",