Test/1540 fix flow tests (#1788)
* fix: local failing tests * chore: remove capsule restart from manual flow * fix: try fix failing wallet test * chore: set capsule teardown to true * chore: revert attempted fix * fix: remove wallet steps * chore: revert investigation changes * chore: move asset wallet faucets * chore: add retry to get asset func * chore: add func for faucet assets without checks * chore: turn off capsule restart after flows * chore: remove commented lines
This commit is contained in:
parent
50611a4ba6
commit
9465543b23
@ -142,7 +142,7 @@ jobs:
|
|||||||
CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }}
|
CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }}
|
||||||
CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }}
|
CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }}
|
||||||
CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }}
|
CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }}
|
||||||
CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: true
|
CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false
|
||||||
|
|
||||||
######
|
######
|
||||||
## Upload logs
|
## Upload logs
|
||||||
|
@ -108,7 +108,7 @@ jobs:
|
|||||||
CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }}
|
CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }}
|
||||||
CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }}
|
CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }}
|
||||||
CYPRESS_NIGHTLY_RUN: true
|
CYPRESS_NIGHTLY_RUN: true
|
||||||
CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: true
|
CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false
|
||||||
|
|
||||||
######
|
######
|
||||||
## Upload logs
|
## Upload logs
|
||||||
|
@ -416,7 +416,7 @@ context(
|
|||||||
cy.get_submitted_proposal_from_proposal_list().within(() =>
|
cy.get_submitted_proposal_from_proposal_list().within(() =>
|
||||||
cy.get(viewProposalButton).click()
|
cy.get(viewProposalButton).click()
|
||||||
);
|
);
|
||||||
cy.contains('Currently set to fail').should('be.visible');
|
cy.contains('currently set to fail').should('be.visible');
|
||||||
cy.contains('Participation: Not Met 0.00 0.00%(0.00% Required)').should(
|
cy.contains('Participation: Not Met 0.00 0.00%(0.00% Required)').should(
|
||||||
'be.visible'
|
'be.visible'
|
||||||
);
|
);
|
||||||
|
@ -294,7 +294,7 @@ context(
|
|||||||
);
|
);
|
||||||
|
|
||||||
cy.get('[data-testid="manage-vega-wallet"]').click();
|
cy.get('[data-testid="manage-vega-wallet"]').click();
|
||||||
cy.get('[data-testid="select-keypair-button"]').click();
|
cy.get('[data-testid="select-keypair-button"]').eq(0).click();
|
||||||
cy.get(connectedVegaKey).should(
|
cy.get(connectedVegaKey).should(
|
||||||
'have.text',
|
'have.text',
|
||||||
Cypress.env('vegaWalletPublicKey2')
|
Cypress.env('vegaWalletPublicKey2')
|
||||||
|
@ -28,6 +28,13 @@ const vegaWalletCurrencyTitle = '[data-testid="currency-title"]';
|
|||||||
const vegaWalletPublicKey = Cypress.env('vegaWalletPublicKey');
|
const vegaWalletPublicKey = Cypress.env('vegaWalletPublicKey');
|
||||||
const txTimeout = Cypress.env('txTimeout');
|
const txTimeout = Cypress.env('txTimeout');
|
||||||
|
|
||||||
|
const faucetAssets = {
|
||||||
|
BTCFake: 'fBTC',
|
||||||
|
DAIFake: 'fDAI',
|
||||||
|
EUROFake: 'fEURO',
|
||||||
|
USDCFake: 'fUSDC',
|
||||||
|
};
|
||||||
|
|
||||||
context(
|
context(
|
||||||
'Vega Wallet - verify elements on widget',
|
'Vega Wallet - verify elements on widget',
|
||||||
{ tags: '@regression' },
|
{ tags: '@regression' },
|
||||||
@ -138,31 +145,16 @@ context(
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// after('close dialog', function () {
|
after('close dialog', function () {
|
||||||
// cy.get(dialogCloseBtn).click().should('not.exist');
|
cy.get(dialogCloseBtn).click().should('not.exist');
|
||||||
// }); - to be changed when dialog state is fixed - https://github.com/vegaprotocol/frontend-monorepo/issues/838
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when vega wallet connected', function () {
|
describe('when vega wallet connected', function () {
|
||||||
before('connect vega wallet', function () {
|
before('connect vega wallet', function () {
|
||||||
cy.vega_wallet_import();
|
cy.vega_wallet_import();
|
||||||
cy.visit('/');
|
cy.visit('/');
|
||||||
cy.get(walletContainer).within(() => {
|
cy.vega_wallet_connect();
|
||||||
cy.get(connectButton).click();
|
|
||||||
});
|
|
||||||
cy.get(connectorsList).within(() => {
|
|
||||||
// using gui option to connect using wallet service V1
|
|
||||||
cy.getByTestId('connector-gui').click();
|
|
||||||
});
|
|
||||||
// cy.vega_wallet_connect(); - to be changed when dialog state is fixed - https://github.com/vegaprotocol/frontend-monorepo/issues/838
|
|
||||||
// then code below can be removed
|
|
||||||
cy.get(restConnectorForm).within(() => {
|
|
||||||
cy.get('#wallet').click().type(Cypress.env('vegaWalletName'));
|
|
||||||
cy.get('#passphrase')
|
|
||||||
.click()
|
|
||||||
.type(Cypress.env('vegaWalletPassphrase'));
|
|
||||||
cy.get('button').contains('Connect').click();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have VEGA WALLET header visible', function () {
|
it('should have VEGA WALLET header visible', function () {
|
||||||
@ -274,7 +266,7 @@ context(
|
|||||||
cy.get(dialog).within(() => {
|
cy.get(dialog).within(() => {
|
||||||
cy.get(copyPublicKeyBtn)
|
cy.get(copyPublicKeyBtn)
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.and('have.text', 'Copy');
|
.and('contain.text', 'Copy');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -305,48 +297,32 @@ context(
|
|||||||
// 2002-SINC-016
|
// 2002-SINC-016
|
||||||
describe('when assets exist in vegawallet', function () {
|
describe('when assets exist in vegawallet', function () {
|
||||||
before('send-faucet assets to connected vega wallet', function () {
|
before('send-faucet assets to connected vega wallet', function () {
|
||||||
cy.vega_wallet_receive_fauceted_asset(
|
cy.vega_wallet_faucet_assets_without_check(
|
||||||
'USDC (fake)',
|
faucetAssets.USDCFake,
|
||||||
'10',
|
'1000000',
|
||||||
vegaWalletPublicKey
|
vegaWalletPublicKey
|
||||||
);
|
);
|
||||||
cy.vega_wallet_receive_fauceted_asset(
|
cy.vega_wallet_faucet_assets_without_check(
|
||||||
'BTC (fake)',
|
faucetAssets.BTCFake,
|
||||||
'6',
|
'600000',
|
||||||
vegaWalletPublicKey
|
vegaWalletPublicKey
|
||||||
);
|
);
|
||||||
cy.vega_wallet_receive_fauceted_asset(
|
cy.vega_wallet_faucet_assets_without_check(
|
||||||
'EURO (fake)',
|
faucetAssets.EUROFake,
|
||||||
'8',
|
'800000',
|
||||||
vegaWalletPublicKey
|
vegaWalletPublicKey
|
||||||
);
|
);
|
||||||
cy.vega_wallet_receive_fauceted_asset(
|
cy.vega_wallet_faucet_assets_without_check(
|
||||||
'DAI (fake)',
|
faucetAssets.DAIFake,
|
||||||
'2',
|
'200000',
|
||||||
vegaWalletPublicKey
|
vegaWalletPublicKey
|
||||||
);
|
);
|
||||||
// cy.vega_wallet_connect(); - to be changed when dialog state is fixed - https://github.com/vegaprotocol/frontend-monorepo/issues/838
|
cy.vega_wallet_connect();
|
||||||
// then code below can be removed
|
|
||||||
cy.get(walletContainer).within(() => {
|
|
||||||
cy.get('button')
|
|
||||||
.contains('Connect Vega wallet to use associated $VEGA')
|
|
||||||
.should('be.enabled')
|
|
||||||
.and('be.visible')
|
|
||||||
.click({ force: true });
|
|
||||||
});
|
|
||||||
cy.getByTestId('connector-gui').click();
|
|
||||||
cy.get(restConnectorForm).within(() => {
|
|
||||||
cy.get('#wallet').click().type(Cypress.env('vegaWalletName'));
|
|
||||||
cy.get('#passphrase')
|
|
||||||
.click()
|
|
||||||
.type(Cypress.env('vegaWalletPassphrase'));
|
|
||||||
cy.get('button').contains('Connect').click();
|
|
||||||
});
|
|
||||||
cy.ethereum_wallet_connect();
|
cy.ethereum_wallet_connect();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should see fUSDC assets - within vega wallet', function () {
|
it('should see fUSDC assets - within vega wallet', function () {
|
||||||
let currency = { id: 'fUSDC', name: 'USDC (fake)' };
|
let currency = { id: faucetAssets.USDCFake, name: 'USDC (fake)' };
|
||||||
cy.get(walletContainer).within(() => {
|
cy.get(walletContainer).within(() => {
|
||||||
cy.get(vegaWalletCurrencyTitle)
|
cy.get(vegaWalletCurrencyTitle)
|
||||||
.contains(currency.id, txTimeout)
|
.contains(currency.id, txTimeout)
|
||||||
@ -366,7 +342,7 @@ context(
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should see fBTC assets - within vega wallet', function () {
|
it('should see fBTC assets - within vega wallet', function () {
|
||||||
let currency = { id: 'fBTC', name: 'BTC (fake)' };
|
let currency = { id: faucetAssets.BTCFake, name: 'BTC (fake)' };
|
||||||
cy.get(walletContainer).within(() => {
|
cy.get(walletContainer).within(() => {
|
||||||
cy.get(vegaWalletCurrencyTitle)
|
cy.get(vegaWalletCurrencyTitle)
|
||||||
.contains(currency.id, txTimeout)
|
.contains(currency.id, txTimeout)
|
||||||
@ -386,7 +362,7 @@ context(
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should see fEURO assets - within vega wallet', function () {
|
it('should see fEURO assets - within vega wallet', function () {
|
||||||
let currency = { id: 'fEURO', name: 'EURO (fake)' };
|
let currency = { id: faucetAssets.EUROFake, name: 'EURO (fake)' };
|
||||||
cy.get(walletContainer).within(() => {
|
cy.get(walletContainer).within(() => {
|
||||||
cy.get(vegaWalletCurrencyTitle)
|
cy.get(vegaWalletCurrencyTitle)
|
||||||
.contains(currency.id, txTimeout)
|
.contains(currency.id, txTimeout)
|
||||||
@ -406,7 +382,7 @@ context(
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should see fDAI assets - within vega wallet', function () {
|
it('should see fDAI assets - within vega wallet', function () {
|
||||||
let currency = { id: 'fDAI', name: 'DAI (fake)' };
|
let currency = { id: faucetAssets.DAIFake, name: 'DAI (fake)' };
|
||||||
cy.get(walletContainer).within(() => {
|
cy.get(walletContainer).within(() => {
|
||||||
cy.get(vegaWalletCurrencyTitle)
|
cy.get(vegaWalletCurrencyTitle)
|
||||||
.contains(currency.id, txTimeout)
|
.contains(currency.id, txTimeout)
|
||||||
|
@ -23,3 +23,21 @@ Cypress.Commands.add('vega_wallet_connect', () => {
|
|||||||
});
|
});
|
||||||
cy.get(vegaWalletNameElement).should('be.visible');
|
cy.get(vegaWalletNameElement).should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add(
|
||||||
|
'vega_wallet_faucet_assets_without_check',
|
||||||
|
function (asset, amount, vegaWalletPublicKey) {
|
||||||
|
cy.highlight(`Topping up vega wallet with ${asset}, amount: ${amount}`);
|
||||||
|
cy.exec(
|
||||||
|
`curl -X POST -d '{"amount": "${amount}", "asset": "${asset}", "party": "${vegaWalletPublicKey}"}' http://localhost:1790/api/v1/mint`
|
||||||
|
)
|
||||||
|
.its('stdout')
|
||||||
|
.then((response) => {
|
||||||
|
assert.include(
|
||||||
|
response,
|
||||||
|
`"success":true`,
|
||||||
|
'Ensuring curl command was successfully undertaken'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user