chore: updated acs for governance (#1711)
This commit is contained in:
parent
06541a1527
commit
d071ffa777
@ -147,7 +147,7 @@ context(
|
||||
});
|
||||
|
||||
it('Should be able to see that no proposals exist', function () {
|
||||
// 1004-VOTE-003
|
||||
// 3001-VOTE-003
|
||||
cy.get(noOpenProposals)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'There are no open or yet to enact proposals');
|
||||
@ -156,17 +156,17 @@ context(
|
||||
.and('have.text', 'There are no enacted or rejected proposals');
|
||||
});
|
||||
|
||||
// 1005-PROP-002
|
||||
// 1005-PROP-003
|
||||
// 3002-PROP-002
|
||||
// 3002-PROP-003
|
||||
it('Submit a proposal form - shows how many vega tokens are required to make a proposal', function () {
|
||||
// 1005-PROP-005
|
||||
// 3002-PROP-005
|
||||
cy.go_to_make_new_proposal(governanceProposalType.NEW_MARKET);
|
||||
cy.contains(
|
||||
`You must have at least ${this.minProposerBalance} VEGA associated to make a proposal`
|
||||
).should('be.visible');
|
||||
});
|
||||
|
||||
// 1005-PROP-011
|
||||
// 3002-PROP-011
|
||||
it(
|
||||
'Able to submit a valid freeform proposal - with minimum required tokens associated',
|
||||
{ tags: '@smoke' },
|
||||
@ -175,7 +175,7 @@ context(
|
||||
this.minProposerBalance
|
||||
);
|
||||
cy.go_to_make_new_proposal(governanceProposalType.FREEFORM);
|
||||
cy.get(minVoteButton).should('be.visible'); // 1005-PROP-008
|
||||
cy.get(minVoteButton).should('be.visible'); // 3002-PROP-008
|
||||
cy.get(maxVoteButton).should('be.visible');
|
||||
cy.get(votingDate).should('not.be.empty');
|
||||
cy.get(voteTwoMinExtraNote).should(
|
||||
@ -184,8 +184,8 @@ context(
|
||||
);
|
||||
cy.enter_unique_freeform_proposal_body('50');
|
||||
cy.get(newProposalSubmitButton).should('be.visible').click();
|
||||
// 1005-PROP-012
|
||||
// 1005-PROP-016
|
||||
// 3002-PROP-012
|
||||
// 3002-PROP-016
|
||||
cy.wait_for_proposal_submitted();
|
||||
}
|
||||
);
|
||||
@ -229,14 +229,14 @@ context(
|
||||
});
|
||||
|
||||
it('Newly created proposals list - shows title and portion of summary', function () {
|
||||
createRawProposal(this.minProposerBalance);
|
||||
createRawProposal(this.minProposerBalance); // 3001-VOTE-052
|
||||
cy.wait('@proposalSubmissionCompletion')
|
||||
.its(proposalResponseProposalIdPath)
|
||||
.then((proposalId) => {
|
||||
cy.get(openProposals).within(() => {
|
||||
cy.get('@rawProposal').then((rawProposal) => {
|
||||
// 1004-VOTE-008
|
||||
// 1004-VOTE-034
|
||||
// 3001-VOTE-008
|
||||
// 3001-VOTE-034
|
||||
cy.get(`#${proposalId}`)
|
||||
.should('contain', rawProposal.rationale.title)
|
||||
.and('be.visible');
|
||||
@ -252,8 +252,8 @@ context(
|
||||
});
|
||||
|
||||
it('Newly created proposals list - shows open proposals in an open state', function () {
|
||||
// 1004-VOTE-004
|
||||
// 1004-VOTE-035
|
||||
// 3001-VOTE-004
|
||||
// 3001-VOTE-035
|
||||
createRawProposal(this.minProposerBalance);
|
||||
cy.wait('@proposalSubmissionCompletion')
|
||||
.its(proposalResponseProposalIdPath)
|
||||
@ -276,7 +276,7 @@ context(
|
||||
});
|
||||
|
||||
it('Newly created proposals list - proposals closest to closing date appear higher in list', function () {
|
||||
// 1004-VOTE-005
|
||||
// 3001-VOTE-005
|
||||
cy.ensure_specified_unstaked_tokens_are_associated(
|
||||
this.minProposerBalance
|
||||
);
|
||||
@ -326,7 +326,7 @@ context(
|
||||
cy.get_submitted_proposal_from_proposal_list()
|
||||
.as('submittedProposal')
|
||||
.within(() => {
|
||||
// 1004-VOTE-039
|
||||
// 3001-VOTE-039
|
||||
cy.get(voteStatus).should('have.text', 'Participation not reached');
|
||||
cy.get(viewProposalButton).click();
|
||||
});
|
||||
@ -367,7 +367,7 @@ context(
|
||||
});
|
||||
});
|
||||
cy.get('@rawProposal').then((freeformProposal) => {
|
||||
// 1004-VOTE-054
|
||||
// 3001-VOTE-054
|
||||
cy.get(proposalDetailsTitle)
|
||||
.should('contain', freeformProposal.rationale.title)
|
||||
.and('be.visible');
|
||||
@ -391,7 +391,7 @@ context(
|
||||
});
|
||||
});
|
||||
cy.get('@rawProposal').then(() => {
|
||||
// 1004-VOTE-055
|
||||
// 3001-VOTE-055
|
||||
cy.get(proposalDetailsDescription)
|
||||
.should('have.attr', 'href')
|
||||
.and(
|
||||
@ -437,13 +437,13 @@ context(
|
||||
.should('be.visible');
|
||||
}
|
||||
);
|
||||
// 1004-VOTE-043
|
||||
// 3001-VOTE-043
|
||||
cy.contains('3 days left to vote').should('be.visible');
|
||||
});
|
||||
|
||||
it('Newly created proposal details - shows default status set to fail', function () {
|
||||
// 1004-VOTE-037
|
||||
// 1004-VOTE-040
|
||||
// 3001-VOTE-037
|
||||
// 3001-VOTE-040
|
||||
createRawProposal(this.minProposerBalance);
|
||||
cy.get_submitted_proposal_from_proposal_list().within(() =>
|
||||
cy.get(viewProposalButton).click()
|
||||
@ -455,8 +455,8 @@ context(
|
||||
cy.get_proposal_information_from_table('Will pass')
|
||||
.contains('👎')
|
||||
.should('be.visible');
|
||||
// 1004-VOTE-062
|
||||
// 1004-VOTE-040
|
||||
// 3001-VOTE-062
|
||||
// 3001-VOTE-040
|
||||
cy.get_proposal_information_from_table('Majority met')
|
||||
.contains('👎')
|
||||
.should('be.visible');
|
||||
@ -465,12 +465,13 @@ context(
|
||||
.should('be.visible');
|
||||
});
|
||||
|
||||
// 3001-VOTE-080 3001-VOTE-090
|
||||
it('Newly created proposal details - ability to vote for and against proposal - with minimum required tokens associated', function () {
|
||||
createRawProposal(this.minProposerBalance);
|
||||
cy.get_submitted_proposal_from_proposal_list()
|
||||
.as('submittedProposal')
|
||||
.within(() => cy.get(viewProposalButton).click());
|
||||
// 1004-VOTE-080
|
||||
// 3001-VOTE-080
|
||||
cy.get(voteButtons).contains('against').should('be.visible');
|
||||
cy.get(voteButtons).contains('for').should('be.visible');
|
||||
cy.vote_for_proposal('for');
|
||||
@ -478,8 +479,8 @@ context(
|
||||
'0',
|
||||
'shortMonth'
|
||||
).then((votedDate) => {
|
||||
// 1004-VOTE-051
|
||||
// 1004-VOTE-093
|
||||
// 3001-VOTE-051
|
||||
// 3001-VOTE-093
|
||||
cy.contains('You voted:')
|
||||
.siblings()
|
||||
.contains('For')
|
||||
@ -505,11 +506,11 @@ context(
|
||||
cy.get_proposal_information_from_table('Tokens against proposal')
|
||||
.should('have.text', '0.00')
|
||||
.and('be.visible');
|
||||
// 1004-VOTE-061
|
||||
// 3001-VOTE-061
|
||||
cy.get_proposal_information_from_table('Participation required')
|
||||
.contains(`${this.requiredParticipation}%`)
|
||||
.should('be.visible');
|
||||
// 1004-VOTE-066
|
||||
// 3001-VOTE-066
|
||||
cy.get_proposal_information_from_table('Majority Required')
|
||||
.contains(`${parseFloat(this.requiredMajority).toFixed(2)}%`)
|
||||
.should('be.visible');
|
||||
@ -518,7 +519,7 @@ context(
|
||||
.and('be.visible');
|
||||
cy.get(changeVoteButton).should('be.visible').click();
|
||||
cy.vote_for_proposal('for');
|
||||
// 1004-VOTE-064
|
||||
// 3001-VOTE-064
|
||||
cy.get_proposal_information_from_table('Tokens for proposal')
|
||||
.should('have.text', parseFloat(this.minProposerBalance).toFixed(2))
|
||||
.and('be.visible');
|
||||
@ -542,7 +543,7 @@ context(
|
||||
.as('submittedProposal')
|
||||
.within(() => cy.get(viewProposalButton).click());
|
||||
cy.vote_for_proposal('for');
|
||||
// 1004-VOTE-079
|
||||
// 3001-VOTE-079
|
||||
cy.contains('You voted: For').should('be.visible');
|
||||
cy.get_proposal_information_from_table('Total Supply')
|
||||
.invoke('text')
|
||||
@ -563,7 +564,7 @@ context(
|
||||
cy.get(proposalVoteProgressAgainstPercentage)
|
||||
.contains('0.00%')
|
||||
.and('be.visible');
|
||||
// 1004-VOTE-065
|
||||
// 3001-VOTE-065
|
||||
cy.get(proposalVoteProgressForTokens)
|
||||
.contains(tokensRequiredToAchieveResult)
|
||||
.and('be.visible');
|
||||
@ -582,18 +583,18 @@ context(
|
||||
cy.get_proposal_information_from_table('Will pass')
|
||||
.contains('👍')
|
||||
.should('be.visible');
|
||||
// 1004-VOTE-062
|
||||
// 3001-VOTE-062
|
||||
cy.get_proposal_information_from_table('Majority met')
|
||||
.contains('👍')
|
||||
.should('be.visible');
|
||||
cy.get_proposal_information_from_table('Participation met')
|
||||
.contains('👍')
|
||||
.should('be.visible');
|
||||
// 1004-VOTE-042
|
||||
// 1004-VOTE-057
|
||||
// 1004-VOTE-058
|
||||
// 1004-VOTE-059
|
||||
// 1004-VOTE-060
|
||||
// 3001-VOTE-042
|
||||
// 3001-VOTE-057
|
||||
// 3001-VOTE-058
|
||||
// 3001-VOTE-059
|
||||
// 3001-VOTE-060
|
||||
cy.contains('Currently set to pass').should('be.visible');
|
||||
});
|
||||
});
|
||||
@ -689,7 +690,7 @@ context(
|
||||
|
||||
// Json containing unexpected field no longer fails submission
|
||||
it.skip('Unable to create a freeform proposal - when json parent section contains unexpected field', function () {
|
||||
// 1004-VOTE-038
|
||||
// 3001-VOTE-038
|
||||
cy.ensure_specified_unstaked_tokens_are_associated(
|
||||
this.minProposerBalance
|
||||
);
|
||||
@ -722,7 +723,7 @@ context(
|
||||
|
||||
// Json containing unexpected field no longer fails submission
|
||||
it.skip('Unable to create a freeform proposal - when json terms section contains unexpected field', function () {
|
||||
// 1004-VOTE-038
|
||||
// 3001-VOTE-038
|
||||
cy.ensure_specified_unstaked_tokens_are_associated(
|
||||
this.minProposerBalance
|
||||
);
|
||||
@ -787,8 +788,8 @@ context(
|
||||
cy.get_submitted_proposal_from_proposal_list()
|
||||
.as('submittedProposal')
|
||||
.within(() => cy.get(viewProposalButton).click());
|
||||
// 1004-VOTE-075
|
||||
// 1004-VOTE-076
|
||||
// 3001-VOTE-075
|
||||
// 3001-VOTE-076
|
||||
cy.get(connectToVegaWalletButton)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Connect Vega wallet')
|
||||
@ -801,13 +802,13 @@ context(
|
||||
});
|
||||
cy.get(vegaWalletNameElement).should('be.visible');
|
||||
cy.get(connectToVegaWalletButton).should('not.exist');
|
||||
// 1004-VOTE-100
|
||||
// 3001-VOTE-100
|
||||
cy.get(vegaWalletAssociatedBalance, txTimeout).contains(
|
||||
'1.000000000000000000',
|
||||
txTimeout
|
||||
);
|
||||
cy.vote_for_proposal('against');
|
||||
// 1004-VOTE-079
|
||||
// 3001-VOTE-079
|
||||
cy.contains('You voted: Against').should('be.visible');
|
||||
});
|
||||
|
||||
|
@ -25,6 +25,7 @@ const governanceProposalType = {
|
||||
RAW: 'raw proposal',
|
||||
};
|
||||
|
||||
// 3001-VOTE-007
|
||||
context(
|
||||
'Governance flow - form validations for different governance proposals',
|
||||
{ tags: '@slow' },
|
||||
@ -55,17 +56,18 @@ context(
|
||||
it('Able to submit valid update network parameter proposal', function () {
|
||||
cy.navigate_to_page_if_not_already_loaded('governance');
|
||||
cy.go_to_make_new_proposal(governanceProposalType.NETWORK_PARAMETER);
|
||||
// 1005-PROP-006
|
||||
// 3002-PROP-006
|
||||
cy.get(newProposalTitle).type('Test update network parameter proposal');
|
||||
// 1005-PROP-007
|
||||
// 3002-PROP-007
|
||||
cy.get(newProposalDescription).type('E2E test for proposals');
|
||||
|
||||
cy.get(proposalParameterSelect).find('option').should('have.length', 109);
|
||||
cy.get(proposalParameterSelect).select(
|
||||
// 3007-PNEC-002
|
||||
'governance_proposal_asset_minEnact'
|
||||
);
|
||||
cy.get(currentParameterValue).should('have.value', '2s');
|
||||
cy.get(newProposedParameterValue).type('5s');
|
||||
cy.get(newProposedParameterValue).type('5s'); // 3007-PNEC-003
|
||||
cy.get(newProposalSubmitButton).should('be.visible').click();
|
||||
cy.wait_for_proposal_submitted();
|
||||
});
|
||||
@ -95,6 +97,7 @@ context(
|
||||
);
|
||||
});
|
||||
|
||||
// 3003-PMAN-001
|
||||
it('Able to submit valid new market proposal', function () {
|
||||
cy.go_to_make_new_proposal(governanceProposalType.NEW_MARKET);
|
||||
cy.get(newProposalTitle).type('Test new market proposal');
|
||||
@ -140,6 +143,7 @@ context(
|
||||
cy.wait_for_proposal_submitted();
|
||||
});
|
||||
|
||||
// 3001-VOTE-026 3001-VOTE-027 3001-VOTE-028 3001-VOTE-095 3001-VOTE-096 3005-PASN-001
|
||||
it('Able to submit new asset proposal', function () {
|
||||
cy.go_to_make_new_proposal(governanceProposalType.NEW_ASSET);
|
||||
cy.get(newProposalTitle).type('Test new asset proposal');
|
||||
|
@ -22,14 +22,14 @@ context(
|
||||
});
|
||||
|
||||
it('should be able to see a working link for - find out more about Vega governance', function () {
|
||||
// 1004-VOTE-001
|
||||
// 3001-VOTE-001
|
||||
cy.get(proposalDocumentationLink)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Find out more about Vega governance')
|
||||
.and('have.attr', 'href')
|
||||
.and('equal', governanceDocsUrl);
|
||||
|
||||
// 1005-PROP-001
|
||||
// 3002-PROP-001
|
||||
cy.request(governanceDocsUrl)
|
||||
.its('body')
|
||||
.then((body) => {
|
||||
@ -44,7 +44,7 @@ context(
|
||||
});
|
||||
|
||||
it('should be able to see button for - new proposal', function () {
|
||||
// 1004-VOTE-002
|
||||
// 3001-VOTE-002
|
||||
cy.get(newProposalLink)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'New proposal')
|
||||
|
Loading…
Reference in New Issue
Block a user