Test/1689 staking acs (#1698)

* test: vesting test with eth wallet connected

* chore: acs for staking added

* chore: acs for staking income
This commit is contained in:
Joe Tsang 2022-10-11 14:49:57 +01:00 committed by GitHub
parent 6ec6c6b8b7
commit 7824c39bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 4 deletions

View File

@ -11,6 +11,7 @@ const stakeAddStakeRadioButton = '[data-testid="add-stake-radio"]';
const stakeMaximumTokens = '[data-testid="token-amount-use-maximum"]';
const totalStake = '[data-testid="total-stake"]';
const stakeShare = '[data-testid="stake-percentage"]';
const nominatedStake = '[data-testid="nominated-stake"]';
const vegaWalletPublicKeyShort = Cypress.env('vegaWalletPublicKeyShort');
const vegaWalletAssociatedBalance = '[data-testid="currency-value"]';
const vegaWalletUnstakedBalance =
@ -88,13 +89,12 @@ context(
1.0,
txTimeout
);
// 2001-STKE-039
cy.get(vegaWalletStakedBalances, txTimeout)
.should('contain', 2.0, txTimeout)
.and('contain', partValidatorId);
cy.get(stakeNextEpochValue, epochTimeout) // 2001-STKE-016
cy.get(stakeNextEpochValue, epochTimeout) // 2001-STKE-016 2001-STKE-038
.contains(2.0, epochTimeout)
.should('be.visible');
@ -102,6 +102,8 @@ context(
.contains(2.0, epochTimeout)
.should('be.visible');
cy.get(nominatedStake).should('have.text', 2); // 2001-STKE-017 2002-SINC-007
cy.navigate_to('staking');
cy.validate_validator_list_total_stake_and_share(
@ -376,6 +378,7 @@ context(
);
});
// 2001-STKE-045
it('Able to remove a full stake against a validator', function () {
cy.staking_page_associate_tokens('3');

View File

@ -138,7 +138,7 @@ context('Staking Page - verify elements on page', function () {
cy.click_on_validator_from_list(0);
});
// 2001-STKE-005
// 2001-STKE-006
it('Should be able to see validator name', function () {
cy.get(validatorTitle).should('not.be.empty');
});
@ -204,7 +204,7 @@ context('Staking Page - verify elements on page', function () {
cy.get(nominatedStake).invoke('text').should('match', stakeNumberRegex);
});
// 2001-STKE-011
// 2001-STKE-011 2002-SINC-001 2002-SINC-002
it('should be able to see epoch information', function () {
const epochTitle = 'h3';
const nextEpochInfo = 'p';

View File

@ -28,5 +28,21 @@ context(
.and('have.text', 'Connect Ethereum wallet');
});
});
describe('with eth wallet connected', function () {
before('connect eth wallet', function () {
cy.ethereum_wallet_connect();
});
// 1005-VEST-001
// 1005-VEST-002
it('Able to view tranches', function () {
cy.get('[href="/tranches"]')
.should('have.text', 'all tranches')
.click();
cy.url().should('include', '/tranches');
cy.get('h1').should('contain.text', 'Vesting tranches');
});
});
}
);

View File

@ -302,6 +302,7 @@ context(
});
});
// 2002-SINC-016
describe('when assets exist in vegawallet', function () {
before('send-faucet assets to connected vega wallet', function () {
cy.vega_wallet_receive_fauceted_asset(