chore: cover 7003-MORD e2e tests order list - fields (#2477)

* chore: cover 7003-MORD e2e tests order list - fields

* chore: formating fix
This commit is contained in:
daro-maj 2022-12-27 14:10:08 +01:00 committed by GitHub
parent 2cb88624f3
commit 28fe7458ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ describe('orders list', { tags: '@smoke' }, () => {
});
it('orders are sorted by most recent order', () => {
//7003-MORD-002
// 7003-MORD-002
const expectedOrderList = ['BTCUSD.MF21', 'BTCUSD.MF21'];
cy.getByTestId('tab-orders')
@ -133,9 +133,9 @@ describe('subscribe orders', { tags: '@smoke' }, () => {
});
});
const orderId = '1234567890';
//7002-SORD-053
//7002-SORD-040
//7003-MORD-001
// 7002-SORD-053
// 7002-SORD-040
// 7003-MORD-001
it('must see an active order', () => {
// 7002-SORD-041
updateOrder({
@ -224,6 +224,70 @@ describe('subscribe orders', { tags: '@smoke' }, () => {
cy.getByTestId(`order-status-${orderId}`).should('have.text', 'Parked');
});
it('must see the size of the order and direction/side -', () => {
// 7003-MORD-003
// 7003-MORD-004
updateOrder({
id: orderId,
size: '15',
side: Schema.Side.SIDE_SELL,
status: Schema.OrderStatus.STATUS_ACTIVE,
});
cy.get(`[row-id=${orderId}]`)
.find('[col-id="size"]')
.should('have.text', '-15');
});
it('must see the size of the order and direction/side +', () => {
// 7003-MORD-003
// 7003-MORD-004
updateOrder({
id: orderId,
size: '5',
side: Schema.Side.SIDE_BUY,
status: Schema.OrderStatus.STATUS_ACTIVE,
});
cy.get(`[row-id=${orderId}]`)
.find('[col-id="size"]')
.should('have.text', '+5');
});
it('for limit typy must see the Limit price that was set on the order', () => {
// 7003-MORD-005
updateOrder({
id: orderId,
status: Schema.OrderStatus.STATUS_ACTIVE,
});
cy.get(`[row-id=${orderId}]`)
.find('[col-id="price"]')
.should('have.text', '200.00');
});
it('for market typy must not see a price for active or parked orders', () => {
// 7003-MORD-005
updateOrder({
id: orderId,
type: Schema.OrderType.TYPE_MARKET,
status: Schema.OrderStatus.STATUS_PARKED,
});
cy.get(`[row-id=${orderId}]`)
.find('[col-id="price"]')
.should('have.text', '200.00');
});
it('must see the time in force applied to the order', () => {
// 7003-MORD-006
updateOrder({
id: orderId,
type: Schema.OrderType.TYPE_MARKET,
status: Schema.OrderStatus.STATUS_ACTIVE,
timeInForce: Schema.OrderTimeInForce.TIME_IN_FORCE_GTC,
});
cy.get(`[row-id=${orderId}]`)
.find(`[col-id='${orderTimeInForce}']`)
.should('have.text', "Good 'til Cancelled (GTC)");
});
it('for Active order when is part of a liquidity or peg shape, must not see an option to amend the individual order ', () => {
// 7003-MORD-008
updateOrder({
@ -288,9 +352,10 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
const orderId = '1234567890';
it('must be able to amend the price of an order', () => {
//7003-MORD-012
//7003-MORD-014
//7003-MORD-015
// 7003-MORD-007
// 7003-MORD-012
// 7003-MORD-014
// 7003-MORD-015
updateOrder({
id: orderId,
status: Schema.OrderStatus.STATUS_ACTIVE,
@ -316,9 +381,10 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
});
});
it('must be able to cancel an individual order', () => {
//7003-MORD-009
//7003-MORD-010
//7003-MORD-011
// 7003-MORD-007
// 7003-MORD-009
// 7003-MORD-010
// 7003-MORD-011
updateOrder({
id: orderId,
status: Schema.OrderStatus.STATUS_ACTIVE,