feat(trading): copy order book volume value to deal ticket (#4333)

This commit is contained in:
Bartłomiej Głownia
2023-07-18 15:46:58 +02:00
committed by maciek
parent c7e4cc45ab
commit dc3a9f57c9
3 changed files with 15 additions and 2 deletions
@@ -81,6 +81,12 @@ describe('order book', { tags: '@smoke' }, () => {
cy.getByTestId(dealTicketSize).should('have.value', '7');
});
it('copy size to deal ticket form', () => {
// 6003-ORDB-009
cy.getByTestId(bidVolume).click();
cy.getByTestId(dealTicketSize).should('have.value', '1');
});
it('change price resolution', () => {
// 6003-ORDB-008
const resolutions = [
+8 -1
View File
@@ -120,8 +120,15 @@ export const OrderbookRow = React.memo(
}
/>
{width >= HIDE_VOL_WIDTH && (
<NumericCell
<PriceCell
testId={`${txtId}-vol-${price}`}
onClick={(value) =>
onClick &&
value &&
onClick({
size: addDecimal(value, positionDecimalPlaces),
})
}
value={value}
valueFormatted={addDecimalsFixedFormatNumber(
value,
+1 -1
View File
@@ -1,4 +1,4 @@
import { useCallback, useMemo, useRef, useState } from 'react';
import { useMemo, useRef, useState } from 'react';
import ReactVirtualizedAutoSizer from 'react-virtualized-auto-sizer';
import {
addDecimalsFormatNumber,