test(trading): add withdrawal delayed (#4268)
This commit is contained in:
parent
3c71a86b48
commit
0665ac85db
@ -92,7 +92,10 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
|
|||||||
|
|
||||||
cy.highlight('deposit verification');
|
cy.highlight('deposit verification');
|
||||||
|
|
||||||
cy.getByTestId('asset', txTimeout).should('contain.text', btcSymbol);
|
cy.get('[col-id="asset.symbol"]', txTimeout).should(
|
||||||
|
'contain.text',
|
||||||
|
btcSymbol
|
||||||
|
);
|
||||||
cy.getByTestId(depositsTab).click();
|
cy.getByTestId(depositsTab).click();
|
||||||
cy.get('.ag-cell-value', txTimeout).should('contain.text', btcSymbol);
|
cy.get('.ag-cell-value', txTimeout).should('contain.text', btcSymbol);
|
||||||
cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout);
|
cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout);
|
||||||
@ -149,7 +152,6 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
|
|||||||
// 1002-WITH-022
|
// 1002-WITH-022
|
||||||
// 1002-WITH-023
|
// 1002-WITH-023
|
||||||
// 0003-WTXN-011
|
// 0003-WTXN-011
|
||||||
|
|
||||||
cy.getByTestId('Withdrawals').click();
|
cy.getByTestId('Withdrawals').click();
|
||||||
cy.getByTestId('withdraw-dialog-button').click();
|
cy.getByTestId('withdraw-dialog-button').click();
|
||||||
selectAsset(0);
|
selectAsset(0);
|
||||||
@ -160,18 +162,9 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
|
|||||||
'contain.text',
|
'contain.text',
|
||||||
'Funds unlocked'
|
'Funds unlocked'
|
||||||
);
|
);
|
||||||
cy.getByTestId(toastCloseBtn).click();
|
// cy.getByTestId(toastCloseBtn).click();
|
||||||
cy.getByTestId('tab-withdrawals').within(() => {
|
|
||||||
cy.get('.ag-center-cols-container')
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.within(() => {
|
|
||||||
cy.get('[col-id="status"]').should('contain.text', 'Pending');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
cy.highlight('withdrawals verification');
|
cy.highlight('withdrawals verification');
|
||||||
cy.getByTestId('toast-complete-withdrawal').click();
|
cy.getByTestId('toast-complete-withdrawal').last().click();
|
||||||
|
|
||||||
cy.getByTestId(toastContent, txTimeout).should(
|
cy.getByTestId(toastContent, txTimeout).should(
|
||||||
'contain.text',
|
'contain.text',
|
||||||
@ -228,9 +221,12 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
timeInForce: Schema.OrderTimeInForce.TIME_IN_FORCE_GTC,
|
timeInForce: Schema.OrderTimeInForce.TIME_IN_FORCE_GTC,
|
||||||
};
|
};
|
||||||
const rawPrice = removeDecimal(order.price, market.decimalPlaces);
|
const rawPrice = removeDecimal(order.price, market.decimalPlaces);
|
||||||
|
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||||
cy.getByTestId('Collateral').click();
|
cy.getByTestId('Collateral').click();
|
||||||
cy.getByTestId('asset', txTimeout).should('contain.text', usdcSymbol);
|
cy.get('[col-id="asset.symbol"]', txTimeout).should(
|
||||||
|
'contain.text',
|
||||||
|
usdcSymbol
|
||||||
|
);
|
||||||
|
|
||||||
createOrder(order);
|
createOrder(order);
|
||||||
|
|
||||||
@ -290,7 +286,9 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
it('can edit order', function () {
|
it('can edit order', function () {
|
||||||
const market = this.market;
|
const market = this.market;
|
||||||
cy.visit(`/#/markets/${market.id}`);
|
cy.visit(`/#/markets/${market.id}`);
|
||||||
|
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||||
cy.getByTestId(openOrdersTab).click();
|
cy.getByTestId(openOrdersTab).click();
|
||||||
|
cy.getByTestId('edit', txTimeout).should('be.visible');
|
||||||
cy.getByTestId('edit').first().should('be.visible').click();
|
cy.getByTestId('edit').first().should('be.visible').click();
|
||||||
cy.getByTestId('dialog-title').should('contain.text', 'Edit order');
|
cy.getByTestId('dialog-title').should('contain.text', 'Edit order');
|
||||||
cy.get('#limitPrice').focus().clear().type(newPrice);
|
cy.get('#limitPrice').focus().clear().type(newPrice);
|
||||||
@ -318,6 +316,7 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
it('can cancel order', function () {
|
it('can cancel order', function () {
|
||||||
const market = this.market;
|
const market = this.market;
|
||||||
cy.visit(`/#/markets/${market.id}`);
|
cy.visit(`/#/markets/${market.id}`);
|
||||||
|
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||||
cy.getByTestId(openOrdersTab).click();
|
cy.getByTestId(openOrdersTab).click();
|
||||||
cy.getByTestId('cancel').first().click();
|
cy.getByTestId('cancel').first().click();
|
||||||
cy.getByTestId(toastContent).should(
|
cy.getByTestId(toastContent).should(
|
||||||
@ -354,7 +353,7 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
|
|
||||||
cy.visit('/#/portfolio');
|
cy.visit('/#/portfolio');
|
||||||
cy.get('main[data-testid="/portfolio"]').should('exist');
|
cy.get('main[data-testid="/portfolio"]').should('exist');
|
||||||
|
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||||
cy.getByTestId('Withdrawals').click();
|
cy.getByTestId('Withdrawals').click();
|
||||||
cy.getByTestId('withdraw-dialog-button').click();
|
cy.getByTestId('withdraw-dialog-button').click();
|
||||||
connectEthereumWallet('Unknown');
|
connectEthereumWallet('Unknown');
|
||||||
@ -365,14 +364,6 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
'contain.text',
|
'contain.text',
|
||||||
'Funds unlocked'
|
'Funds unlocked'
|
||||||
);
|
);
|
||||||
cy.getByTestId('tab-withdrawals').within(() => {
|
|
||||||
cy.get('.ag-center-cols-container')
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.within(() => {
|
|
||||||
cy.get('[col-id="status"]').should('contain.text', 'Pending');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
cy.highlight('withdrawals verification');
|
cy.highlight('withdrawals verification');
|
||||||
cy.getByTestId('toast-complete-withdrawal').click();
|
cy.getByTestId('toast-complete-withdrawal').click();
|
||||||
@ -454,6 +445,7 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
// 1001-DEPO-007
|
// 1001-DEPO-007
|
||||||
cy.visit('/#/portfolio');
|
cy.visit('/#/portfolio');
|
||||||
cy.get('main[data-testid="/portfolio"]').should('exist');
|
cy.get('main[data-testid="/portfolio"]').should('exist');
|
||||||
|
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||||
cy.getByTestId(depositsTab).click();
|
cy.getByTestId(depositsTab).click();
|
||||||
cy.getByTestId('deposit-button').click();
|
cy.getByTestId('deposit-button').click();
|
||||||
connectEthereumWallet('Unknown');
|
connectEthereumWallet('Unknown');
|
||||||
@ -474,8 +466,8 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
// 1002-WITH-007
|
// 1002-WITH-007
|
||||||
|
|
||||||
cy.visit('/#/portfolio');
|
cy.visit('/#/portfolio');
|
||||||
cy.get('main[data-testid="/portfolio"]').should('exist');
|
cy.get('main[data-testid="/portfolio"]', txTimeout).should('exist');
|
||||||
|
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||||
cy.getByTestId(depositsTab).click();
|
cy.getByTestId(depositsTab).click();
|
||||||
cy.getByTestId('deposit-button').click();
|
cy.getByTestId('deposit-button').click();
|
||||||
connectEthereumWallet('Unknown');
|
connectEthereumWallet('Unknown');
|
||||||
@ -497,7 +489,10 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
|
|
||||||
cy.highlight('deposit verification');
|
cy.highlight('deposit verification');
|
||||||
|
|
||||||
cy.getByTestId('asset', txTimeout).should('contain.text', vegaSymbol);
|
cy.get('[col-id="asset.symbol"]', txTimeout).should(
|
||||||
|
'contain.text',
|
||||||
|
vegaSymbol
|
||||||
|
);
|
||||||
cy.getByTestId(depositsTab).click();
|
cy.getByTestId(depositsTab).click();
|
||||||
cy.get('.ag-cell-value', txTimeout).should('contain.text', vegaSymbol);
|
cy.get('.ag-cell-value', txTimeout).should('contain.text', vegaSymbol);
|
||||||
cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout);
|
cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout);
|
||||||
@ -535,6 +530,16 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
cy.getByTestId(toastCloseBtn).click();
|
cy.getByTestId(toastCloseBtn).click();
|
||||||
cy.getByTestId(completeWithdrawalBtn).first().should('be.visible').click();
|
cy.getByTestId(completeWithdrawalBtn).first().should('be.visible').click();
|
||||||
cy.getByTestId(toastContent, txTimeout).should('contain.text', 'Delayed');
|
cy.getByTestId(toastContent, txTimeout).should('contain.text', 'Delayed');
|
||||||
|
cy.getByTestId('tab-withdrawals').within(() => {
|
||||||
|
cy.get('.ag-center-cols-container')
|
||||||
|
.children()
|
||||||
|
.first()
|
||||||
|
.within(() => {
|
||||||
|
cy.get('[col-id="status"]').contains(
|
||||||
|
/Delayed \(ready in (\d{1,2}:\d{2}:\d{2}:\d{2})\)/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user