Skip to content

Commit

Permalink
test(trading): fixed capsule tests (#3281)
Browse files Browse the repository at this point in the history
  • Loading branch information
daro-maj authored Mar 27, 2023
1 parent a2b112d commit 477d523
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions apps/trading-e2e/src/integration/capsule.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
cy.getByTestId(transferForm).find(submitTransferBtn).click();
cy.getByTestId(toastContent).should(
'contain.text',
'Transfer completeYour transaction has been confirmed TransferTo 7f9cf0…c255351.00 tBTC'
'Transfer completeYour transaction has been confirmed View in block explorerTransferTo 7f9cf0…c255351.00 tBTC'
);
cy.getByTestId(toastCloseBtn).click();
});
Expand Down Expand Up @@ -283,7 +283,7 @@ describe('capsule', { tags: '@slow' }, () => {
});
});
// comment because of bug #2695
it.skip('can edit order', function () {
it('can edit order', function () {
cy.getByTestId(ordersTab).click();
cy.getByTestId('edit').first().should('be.visible').click();
cy.getByTestId('dialog-title').should('contain.text', 'Edit order');
Expand Down Expand Up @@ -422,7 +422,11 @@ describe('capsule', { tags: '@slow' }, () => {
cy.getByTestId(depositSubmit).click();
cy.getByTestId('input-error-text').should(
'contain.text',
'Amount is above approved amount.Update approve amount'
'Amount is above approved amount'
);
cy.getByTestId('reapprove-default').should(
'contain.text',
'Approve again to deposit more than'
);
});

Expand All @@ -437,17 +441,19 @@ describe('capsule', { tags: '@slow' }, () => {
cy.getByTestId('deposit-button').click();
connectEthereumWallet('Unknown');
cy.get(assetSelectField, txTimeout).select(vegaName, { force: true });
cy.getByTestId('deposit-submit').click();
cy.getByTestId('dialog-title').should('contain.text', 'Approve complete');
cy.get('[data-testid="Return to deposit"]').click();
cy.getByTestId('approve-submit').click();
cy.getByTestId('approve-confirmed').should(
'contain.text',
'You can now make deposits in VEGA, up to a maximum of'
);
cy.get(amountField).clear().type('10000');
cy.getByTestId('deposit-submit').click();
cy.getByTestId(toastContent, txTimeout).should(
'contain.text',
`Your transaction has been confirmed.`,
{ matchCase: false }
);
cy.getByTestId(toastCloseBtn).click();
cy.getByTestId(toastCloseBtn).click({ multiple: true });
cy.getByTestId('Collateral').click();

cy.highlight('deposit verification');
Expand Down

0 comments on commit 477d523

Please sign in to comment.