From 445897eb2b6bbab6e3a011f984528211fee44e1d Mon Sep 17 00:00:00 2001 From: "m.ray" <16125548+MadalinaRaicu@users.noreply.github.com> Date: Mon, 15 Aug 2022 10:42:34 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20use=20position=20decimal=20places=20for?= =?UTF-8?q?=20volume=20and=20decimal=20places=20=E2=80=A6=20(#1026)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: #1025 use position decimal places for volume and decimal places for price and interest * fix: market-info.cy.ts test * fix: market-info.cy.ts --- .../src/integration/market-info.cy.ts | 21 ++++++++++++------- .../src/components/info-market.tsx | 21 +++++++++++++++++-- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/apps/trading-e2e/src/integration/market-info.cy.ts b/apps/trading-e2e/src/integration/market-info.cy.ts index 360ef8aaa..898ae14cd 100644 --- a/apps/trading-e2e/src/integration/market-info.cy.ts +++ b/apps/trading-e2e/src/integration/market-info.cy.ts @@ -23,16 +23,21 @@ describe('market info is displayed', () => { validateMarketDataRow(2, 'Liquidity Fee', '1.00%'); }); - it('market data displated', () => { - cy.getByTestId(marketTitle).contains('Market data').click(); + it('market volume displayed', () => { + cy.getByTestId(marketTitle).contains('Market volume').click(); + + validateMarketDataRow(0, 'Indicative Volume', '0'); + validateMarketDataRow(1, 'Best Bid Volume', '5'); + validateMarketDataRow(2, 'Best Offer Volume', '1'); + validateMarketDataRow(3, 'Best Static Bid Volume', '5'); + validateMarketDataRow(4, 'Best Static Offer Volume', '1'); + }); + + it('market price and interest displayed', () => { + cy.getByTestId(marketTitle).contains('Market price and interest').click(); validateMarketDataRow(0, 'Mark Price', '57.49'); - validateMarketDataRow(1, 'Indicative Volume', '0'); - validateMarketDataRow(2, 'Best Bid Volume', '5'); - validateMarketDataRow(3, 'Best Offer Volume', '1'); - validateMarketDataRow(4, 'Best Static Bid Volume', '5'); - validateMarketDataRow(5, 'Best Static Offer Volume', '1'); - validateMarketDataRow(6, 'Open Interest', '0.00'); + validateMarketDataRow(1, 'Open Interest', '0.00'); }); it('key details displayed', () => { diff --git a/libs/deal-ticket/src/components/info-market.tsx b/libs/deal-ticket/src/components/info-market.tsx index 43d8d5d67..21966c24e 100644 --- a/libs/deal-ticket/src/components/info-market.tsx +++ b/libs/deal-ticket/src/components/info-market.tsx @@ -193,14 +193,31 @@ export const Info = ({ market }: InfoProps) => { ), }, { - title: t('Market data'), + title: t('Market price and interest'), content: ( ), }, + { + title: t('Market volume'), + content: ( + + ), + }, ]; const keyDetails = pick(