From 08e204fe3186558a2e4486779929916ea905625f Mon Sep 17 00:00:00 2001 From: Joe Tsang <30622993+jtsang586@users.noreply.github.com> Date: Thu, 7 Sep 2023 15:15:41 +0100 Subject: [PATCH] test(explorer): test for network param grouping (#4710) --- .../src/integration/network.cy.js | 19 +++++++++++++++---- specs/0006-NETW-network-and-nodes.md | 7 +++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/apps/explorer-e2e/src/integration/network.cy.js b/apps/explorer-e2e/src/integration/network.cy.js index 052c5c74e..445e24930 100644 --- a/apps/explorer-e2e/src/integration/network.cy.js +++ b/apps/explorer-e2e/src/integration/network.cy.js @@ -1,12 +1,9 @@ context('Network parameters page', { tags: '@smoke' }, function () { before('navigate to network parameter page', function () { cy.fixture('net_parameter_format_lookup').as('networkParameterFormat'); + cy.visit('/network-parameters'); }); describe('Verify elements on page', function () { - beforeEach(() => { - cy.visit('/network-parameters'); - }); - const networkParametersHeader = '[data-testid="network-param-header"]'; const tableRows = '[data-testid="key-value-table-row"]'; @@ -16,6 +13,7 @@ context('Network parameters page', { tags: '@smoke' }, function () { .and('be.visible'); }); + // 0006-NETW-021 it('should list each of the network parameters available', function () { cy.get_network_parameters().then((network_parameters) => { const numberOfNetworkParametersInSystem = @@ -198,6 +196,19 @@ context('Network parameters page', { tags: '@smoke' }, function () { }); }); + // 0006-NETW-022 0006-NETW-023 + it('governance assets should be correctly grouped', function () { + cy.getByTestId('governance') + .should('exist') + .parent() + .should('have.attr', 'href', '/network-parameters#governance'); + cy.get('[id="governance-proposal-asset"]') + .parent() + .within(() => { + cy.getByTestId('key-value-table-row').should('have.length', 8); + }); + }); + it('should be able to see network parameters - on mobile', function () { cy.switchToMobile(); cy.get_network_parameters().then((network_parameters) => { diff --git a/specs/0006-NETW-network-and-nodes.md b/specs/0006-NETW-network-and-nodes.md index 50f4b964a..067ee1631 100644 --- a/specs/0006-NETW-network-and-nodes.md +++ b/specs/0006-NETW-network-and-nodes.md @@ -25,6 +25,7 @@ - **Must** be able to click on current node to open node switcher dialog (0006-NETW-012) - In the node dialog + - **Must** must see all nodes provided by the [network config](https://github.com/vegaprotocol/networks) (0006-NETW-013) - For each node - **Must** see the response time of the node (0006-NETW-014) @@ -34,3 +35,9 @@ - **Must** be able to select 'other' to input a node address and connect to it (0006-NETW-018) - **Must** have disabled connect button if 'other' is selected but no url has been entered (0006-NETW-019) - **Must** have disabled connect button if selected node is the current node (0006-NETW-020) + + ## Block Explorer + + - **Must** show all possible network parameters (0006-NETW-021) + - **Must** I can see network parameters grouped by type (0006-NETW-022) + - **Must** Network parameter headings act as linkable anchors i.e. a third party website can link directly to a "section" of the network parameter page (0006-NETW-022)