test(2306): token acs (#2352)

* chore: add acs to wallet tests

* chore: additional acs added

* chore: revert explorer changes

* chore: fix lint

* chore: generate 2nd pub key in workflow

* chore: revert copy pub key test
This commit is contained in:
Joe Tsang 2022-12-08 08:53:42 +00:00 committed by GitHub
parent 09af8db1fe
commit f1f775268f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 176 additions and 149 deletions

View File

@ -20,6 +20,10 @@ runs:
shell: bash
run: vega wallet import -w capsule_wallet --recovery-phrase-file ./frontend-monorepo/vegacapsule/recovery -p ./passphrase --home ~/.vegacapsule/testnet/wallet
- name: Generate second public key
shell: bash
run: vega wallet key generate -w capsule_wallet -p ./passphrase --home ~/.vegacapsule/testnet/wallet
- name: Import network
shell: bash
run: vega wallet network import --force --from-file ./frontend-monorepo/vegacapsule/wallet-config.toml --home ~/.vegacapsule/testnet/wallet

View File

@ -633,6 +633,7 @@ context(
.and('be.visible');
});
// 0005-ETXN-004
it('Unable to create a proposal - when no tokens are associated', function () {
cy.vega_wallet_teardown();
cy.get(vegaWalletAssociatedBalance, txTimeout).contains(

View File

@ -96,6 +96,7 @@ context(
cy.navigate_to('validators');
// 2002-SINC-007
cy.validate_validator_list_total_stake_and_share('0', '2.00', '100%');
});

View File

@ -27,6 +27,7 @@ context(
function () {
before('visit staking tab and connect vega wallet', function () {
cy.visit('/');
// 0005-ETXN-001
cy.vega_wallet_set_specified_approval_amount('1000');
});
@ -54,8 +55,12 @@ context(
//1004-ASSO-014
//1004-ASSO-015
//1004-ASSO-030
//0005-ETXN-006
//0005-ETXN-003
//0005-ETXN-005
cy.staking_page_associate_tokens('2');
// 0005-ETXN-002
cy.get(ethWalletAssociatedBalances, txTimeout)
.contains(vegaWalletPublicKeyShort)
.parent(txTimeout)
@ -77,6 +82,7 @@ context(
// 1004-ASSO-027
// 1004-ASSO-028
// 1004-ASSO-029
// 1004-ASSO-031
cy.staking_page_associate_tokens('2');

View File

@ -83,6 +83,7 @@ context(
});
});
// 0004-EWAL-001 0004-EWAL-002
describe('when Ethereum wallet connected', function () {
before('connect to Ethereum wallet', function () {
cy.ethereum_wallet_connect();
@ -96,6 +97,7 @@ context(
});
});
// 0004-EWAL-005
it('should have account number visible', function () {
cy.get(walletContainer).within(() => {
cy.get(accountNo)
@ -118,6 +120,7 @@ context(
});
});
// 0004-EWAL-007
it('should have Disconnect button visible', function () {
cy.get(walletContainer).within(() => {
cy.get(disconnect)

View File

@ -108,14 +108,13 @@ context(
});
describe('when rest connector form opened', function () {
// Note using desktop wallet app link temporarily whilst its still on v1,
// tests will need to be updated to handle v2
before('click hosted wallet app button', function () {
cy.get(connectorsList).within(() => {
cy.getByTestId('connector-hosted').click();
});
});
// 0002-WCON-002
it('should have wallet field visible', function () {
cy.get(restConnectorForm).within(() => {
cy.get(restWallet).should('be.visible');
@ -154,6 +153,7 @@ context(
cy.vega_wallet_teardown();
});
// 0002-WCON-007
it('should have VEGA WALLET header visible', function () {
cy.get(walletContainer).within(() => {
cy.get(walletHeader)
@ -162,6 +162,7 @@ context(
});
});
// 0002-WCON-008
it(
'should have truncated account number visible',
{ tags: '@smoke' },
@ -225,7 +226,6 @@ context(
cy.get(manageLink).should('be.visible').and('have.text', 'Manage');
});
});
});
describe('when Manage dialog opened', function () {
before('click Manage link', function () {
@ -234,6 +234,7 @@ context(
});
});
// 0002-WCON-025, 0002-WCON-026
it('should have SELECT A VEGA KEY dialog title visible', function () {
cy.get(dialog).within(() => {
cy.get(dialogHeader)
@ -242,19 +243,28 @@ context(
});
});
it.skip('should have vega wallet public key and name visible', function () {
// 0002-WCON-027
it('should have vega wallet public keys visible', function () {
const truncatedPubKey1 = truncateByChars(
Cypress.env('vegaWalletPublicKey')
);
const truncatedPubKey2 = truncateByChars(
Cypress.env('vegaWalletPublicKey2')
);
cy.get(dialog).within(() => {
cy.getByTestId('selected-key').should(
'contain.text',
truncatedPubKey1
);
cy.get(dialogVegaKey)
.should('be.visible')
.and(
'have.text',
`${Cypress.env('vegaWalletName')} key 1 ${truncateByChars(
Cypress.env('vegaWalletPublicKey')
)}`
);
.and('contain.text', truncatedPubKey1)
.and('contain.text', truncatedPubKey2);
});
});
// 0002-WCON-029
it('should have copy public key button visible', function () {
cy.get(dialog).within(() => {
cy.get(copyPublicKeyBtn)
@ -277,12 +287,13 @@ context(
});
});
// 0002-WCON-022
it('should be able to disconnect all keys', function () {
cy.get(dialog).within(() => {
cy.get(dialogDisconnectBtn).click();
});
cy.get(walletContainer).within(() => {
cy.get(connectButton).should('be.visible');
cy.get(connectButton).should('be.visible'); // 0002-WCON-023
});
});
});
@ -394,5 +405,6 @@ context(
});
});
});
});
}
);