From 1fb61d313c7010da0ddc9c880eceece42d1ebab3 Mon Sep 17 00:00:00 2001 From: Joe Tsang <30622993+jtsang586@users.noreply.github.com> Date: Fri, 28 Jul 2023 09:34:30 +0100 Subject: [PATCH] chore(governance): add acs for network upgrade banner and estimate (#4402) --- .../src/integration/view/proposal.cy.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/governance-e2e/src/integration/view/proposal.cy.ts b/apps/governance-e2e/src/integration/view/proposal.cy.ts index 048245a2b..02f282e5a 100644 --- a/apps/governance-e2e/src/integration/view/proposal.cy.ts +++ b/apps/governance-e2e/src/integration/view/proposal.cy.ts @@ -17,6 +17,7 @@ const governanceDocsUrl = 'https://vega.xyz/governance'; const networkUpgradeProposalListItem = 'protocol-upgrade-proposals-list-item'; const closedProposals = 'closed-proposals'; const closedProposalToggle = 'closed-proposals-toggle-networkUpgrades'; +const protocolUpgradeTime = 'protocol-upgrade-time'; context( 'Governance Page - verify elements on page', @@ -174,6 +175,7 @@ context( }); }); + // 3009-NTWU-003 3009-NTWU-004 3009-NTWU-007 it('should see details of network upgrade proposal', function () { mockNetworkUpgradeProposal(); navigateTo(navigation.proposals); @@ -228,6 +230,7 @@ context( cy.getByTestId(closedProposalToggle).should('not.exist'); }); + // 3009-NTWU-001 3009-NTWU-002 3009-NTWU-006 3009-NTWU-009 it('should display network upgrade banner with estimate', function () { mockNetworkUpgradeProposal(); cy.visit('/'); @@ -259,10 +262,18 @@ context( .as('displayedEstimate'); cy.get('@displayedEstimate').then((estimateText) => { // Estimated time should automatically update every second - cy.getByTestId('protocol-upgrade-time') + cy.getByTestId(protocolUpgradeTime) .invoke('text') .should('not.eq', estimateText); }); + // time estimate on proposal detail + cy.getByTestId('protocol-upgrade-proposal').within(() => { + cy.get('@displayedEstimate').then((estimateText) => { + cy.getByTestId(protocolUpgradeTime) + .invoke('text') + .should('not.eq', estimateText); + }); + }); }); } );