chore(test updates): fix withdrawal tests (#2007)
* chore: update withdrawal tests * chore: fix teardown for manual flow * chore: add wait * chore: remove waits * chore: update vega to v 0.62 * chore: reload page for first withdrawal * chore: add navigate to withdrawals * chore: add click * fix: lint * chore: turn off teardown and revert tag change
This commit is contained in:
parent
9a987f752c
commit
6a0ec22ee4
@ -28,8 +28,7 @@ on:
|
|||||||
default: false
|
default: false
|
||||||
env:
|
env:
|
||||||
GOBIN: /home/runner/go/bin
|
GOBIN: /home/runner/go/bin
|
||||||
VEGA_VERSION: 'v0.58.0'
|
VEGA_VERSION: 'v0.62.0'
|
||||||
capsule-teardown: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
manual:
|
manual:
|
||||||
@ -58,5 +57,5 @@ jobs:
|
|||||||
vega-version: ${{needs.manual.outputs.vega-version}}
|
vega-version: ${{needs.manual.outputs.vega-version}}
|
||||||
gobin: ${{needs.manual.outputs.gobin}}
|
gobin: ${{needs.manual.outputs.gobin}}
|
||||||
skip-cache: ${{needs.manual.outputs.skip-cache}}
|
skip-cache: ${{needs.manual.outputs.skip-cache}}
|
||||||
capsule-teardown: ${{needs.manual.capsule-teardown}}
|
|
||||||
tags: ${{needs.manual.outputs.tags}}
|
tags: ${{needs.manual.outputs.tags}}
|
||||||
|
capsule-teardown: false
|
||||||
|
@ -13,8 +13,8 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
project: '[console-lite-e2e, explorer-e2e, liquidity-provision-dashboard-e2e, stats-e2e, token-e2e, trading-e2e]'
|
project: '[console-lite-e2e, explorer-e2e, liquidity-provision-dashboard-e2e, stats-e2e, token-e2e, trading-e2e]'
|
||||||
vega-version: 'v0.58.0'
|
vega-version: 'v0.62.0'
|
||||||
gobin: /home/runner/go/bin
|
gobin: /home/runner/go/bin
|
||||||
tags: --env.grepTags '[ @smoke, @regression, @slow ]'
|
tags: --env.grepTags '[ @smoke, @regression, @slow ]'
|
||||||
night-run: true
|
night-run: true
|
||||||
capsule-teardown: true
|
capsule-teardown: false
|
||||||
|
2
.github/workflows/capsule-cypress.yml
vendored
2
.github/workflows/capsule-cypress.yml
vendored
@ -14,7 +14,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
GOBIN: /home/runner/go/bin
|
GOBIN: /home/runner/go/bin
|
||||||
VEGA_VERSION: 'v0.58.0'
|
VEGA_VERSION: 'v0.62.0'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr:
|
pr:
|
||||||
|
@ -5,7 +5,6 @@ const amountInput = 'amount-input';
|
|||||||
const balanceAvailable = 'BALANCE_AVAILABLE_value';
|
const balanceAvailable = 'BALANCE_AVAILABLE_value';
|
||||||
const withdrawalThreshold = 'WITHDRAWAL_THRESHOLD_value';
|
const withdrawalThreshold = 'WITHDRAWAL_THRESHOLD_value';
|
||||||
const delayTime = 'DELAY_TIME_value';
|
const delayTime = 'DELAY_TIME_value';
|
||||||
const useMaximum = 'use-maximum';
|
|
||||||
const submitWithdrawalButton = 'submit-withdrawal';
|
const submitWithdrawalButton = 'submit-withdrawal';
|
||||||
const dialogTitle = 'dialog-title';
|
const dialogTitle = 'dialog-title';
|
||||||
const dialogClose = 'dialog-close';
|
const dialogClose = 'dialog-close';
|
||||||
@ -37,31 +36,33 @@ context(
|
|||||||
cy.navigate_to('withdrawals');
|
cy.navigate_to('withdrawals');
|
||||||
cy.vega_wallet_connect();
|
cy.vega_wallet_connect();
|
||||||
cy.ethereum_wallet_connect();
|
cy.ethereum_wallet_connect();
|
||||||
waitForAssetsDisplayed(usdtName);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Able to open withdrawal form with vega wallet connected', function () {
|
it('Able to open withdrawal form with vega wallet connected', function () {
|
||||||
|
// needs to reload page for withdrawal form to be displayed in ci - not reproducible outside of ci
|
||||||
|
cy.getByTestId(withdraw).should('be.visible').click();
|
||||||
|
cy.visit('/');
|
||||||
|
cy.navigate_to('withdrawals');
|
||||||
|
cy.ethereum_wallet_connect();
|
||||||
cy.getByTestId(withdraw).should('be.visible').click();
|
cy.getByTestId(withdraw).should('be.visible').click();
|
||||||
cy.getByTestId(selectAsset)
|
cy.getByTestId(selectAsset)
|
||||||
.find('option')
|
.find('option')
|
||||||
.should('have.length.at.least', 5);
|
.should('have.length.at.least', 2);
|
||||||
cy.getByTestId(ethAddressInput).should('be.visible');
|
cy.getByTestId(ethAddressInput).should('be.visible');
|
||||||
cy.getByTestId(amountInput).should('be.visible');
|
cy.getByTestId(amountInput).should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Unable to submit withdrawal with invalid fields', function () {
|
it('Unable to submit withdrawal with invalid fields', function () {
|
||||||
cy.getByTestId(withdraw).should('be.visible').click();
|
cy.getByTestId(withdraw).should('be.visible').click();
|
||||||
cy.getByTestId(selectAsset).select('BTC (local)');
|
cy.getByTestId(selectAsset).select(usdtName);
|
||||||
cy.getByTestId(balanceAvailable).should('have.text', '0.00000');
|
|
||||||
cy.getByTestId(submitWithdrawalButton).click();
|
cy.getByTestId(submitWithdrawalButton).click();
|
||||||
cy.getByTestId(formValidationError).should('have.length', 1);
|
cy.getByTestId(formValidationError).should('have.length', 1);
|
||||||
cy.getByTestId(useMaximum).click();
|
cy.getByTestId(amountInput).clear().click().type('0.0000001');
|
||||||
cy.getByTestId(submitWithdrawalButton).click();
|
cy.getByTestId(submitWithdrawalButton).click();
|
||||||
cy.getByTestId(formValidationError).should(
|
cy.getByTestId(formValidationError).should(
|
||||||
'have.text',
|
'have.text',
|
||||||
'Value is below minimum'
|
'Value is below minimum'
|
||||||
);
|
);
|
||||||
cy.getByTestId(selectAsset).select(usdtName);
|
|
||||||
cy.getByTestId(amountInput).clear().click().type('10');
|
cy.getByTestId(amountInput).clear().click().type('10');
|
||||||
cy.getByTestId(ethAddressInput).click().type('123');
|
cy.getByTestId(ethAddressInput).click().type('123');
|
||||||
cy.getByTestId(submitWithdrawalButton).click();
|
cy.getByTestId(submitWithdrawalButton).click();
|
||||||
|
Loading…
Reference in New Issue
Block a user