test(trading): capsule tests - fix for wallet connection (#3885)

This commit is contained in:
daro-maj
2023-05-23 20:02:29 +02:00
committed by GitHub
parent 4c3ceb94f3
commit a305c5b8a9
3 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ module.exports = defineConfig({
viewportHeight: 900,
responseTimeout: 50000,
requestTimeout: 20000,
retries: 2,
retries: 1,
testIsolation: false,
},
env: {
+10 -10
View File
@@ -50,10 +50,7 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
cy.wrap(markets[0]).as('market');
});
cy.visit('/#/portfolio');
});
beforeEach(() => {
cy.setVegaWallet();
cy.connectVegaWallet();
});
it('can deposit', function () {
@@ -172,7 +169,6 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
'contain.text',
'Error occurredcannot estimate gas'
);
cy.getByTestId(toastCloseBtn).click({ multiple: true });
cy.getByTestId(completeWithdrawalBtn).should(
'contain.text',
'Complete withdrawal'
@@ -376,10 +372,14 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
'contain.text',
'Transaction confirmed'
);
cy.getByTestId(toastContent, txTimeout).should(
'contain.text',
'Funds unlockedYour funds have been unlocked for withdrawalView in block explorerWithdraw 1.00 tBTCComplete withdrawal'
);
cy.getByTestId(toastContent, txTimeout)
.should('contain.text', 'Funds unlocked')
.and('contain.text', 'Your funds have been unlocked for withdrawal.')
.and(
'contain.text',
'View in block explorerYou can save your withdrawal details for extra security.'
)
.and('contain.text', 'Withdraw 1.00 tBTCComplete withdrawal');
cy.get('.ag-center-cols-container')
.find('[col-id="status"]')
@@ -407,7 +407,7 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
});
cy.getByTestId('withdraw-dialog-button').click({ force: true });
cy.getByTestId('BALANCE_AVAILABLE_value').should('have.text', '7.999');
// cy.getByTestId('BALANCE_AVAILABLE_value').should('have.text', '6.999');
});
it('approved amount is less than deposit', function () {
@@ -465,6 +465,7 @@ const VegaTxCompleteToastsContent = ({ tx }: VegaTxToastContentProps) => {
<a
href="#"
className="inline underline underline-offset-4 cursor-pointer text-inherit break-words"
data-testid="toast-withdrawal-details"
onClick={(e) => {
e.preventDefault();
if (tx.withdrawal?.id) {