From 968ec4f3f84e4c3b4273a1910fa78f1a996acce2 Mon Sep 17 00:00:00 2001 From: asiaznik Date: Wed, 6 Mar 2024 14:27:31 +0100 Subject: [PATCH] fix: unit tests --- .../deal-ticket/src/components/deal-ticket/deal-ticket.spec.tsx | 2 +- libs/fills/src/lib/test-helpers.ts | 1 + libs/funding-payments/src/lib/test-helpers.ts | 2 +- .../src/lib/components/order-list/order-edit-dialog.spec.tsx | 2 +- libs/withdraws/src/lib/withdraw-form-container.spec.tsx | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/deal-ticket/src/components/deal-ticket/deal-ticket.spec.tsx b/libs/deal-ticket/src/components/deal-ticket/deal-ticket.spec.tsx index f2f4f8249..dc3a23f15 100644 --- a/libs/deal-ticket/src/components/deal-ticket/deal-ticket.spec.tsx +++ b/libs/deal-ticket/src/components/deal-ticket/deal-ticket.spec.tsx @@ -883,7 +883,7 @@ describe('DealTicket', () => { 'deal-ticket-error-message-price' ); expect(errorMessage).toHaveTextContent( - 'Price accepts up to 2 decimal places' + 'Price must be a multiple of 0.01 for this market' ); }); }); diff --git a/libs/fills/src/lib/test-helpers.ts b/libs/fills/src/lib/test-helpers.ts index 4428140c6..9d44ffd90 100644 --- a/libs/fills/src/lib/test-helpers.ts +++ b/libs/fills/src/lib/test-helpers.ts @@ -54,6 +54,7 @@ export const generateFill = (override?: PartialDeep) => { decimalPlaces: 5, state: MarketState.STATE_ACTIVE, tradingMode: MarketTradingMode.TRADING_MODE_CONTINUOUS, + tickSize: '1', fees: { __typename: 'Fees', factors: { diff --git a/libs/funding-payments/src/lib/test-helpers.ts b/libs/funding-payments/src/lib/test-helpers.ts index 6889169be..fd9763eca 100644 --- a/libs/funding-payments/src/lib/test-helpers.ts +++ b/libs/funding-payments/src/lib/test-helpers.ts @@ -22,7 +22,7 @@ export const generateFundingPayment = ( decimalPlaces: 5, state: MarketState.STATE_ACTIVE, tradingMode: MarketTradingMode.TRADING_MODE_CONTINUOUS, - + tickSize: '1', fees: { __typename: 'Fees', factors: { diff --git a/libs/orders/src/lib/components/order-list/order-edit-dialog.spec.tsx b/libs/orders/src/lib/components/order-list/order-edit-dialog.spec.tsx index cd59c6131..deace6952 100644 --- a/libs/orders/src/lib/components/order-list/order-edit-dialog.spec.tsx +++ b/libs/orders/src/lib/components/order-list/order-edit-dialog.spec.tsx @@ -24,7 +24,7 @@ describe('OrderEditDialog', () => { await userEvent.click(submitButton); const inputErrorText = within(editOrder).getByTestId('input-error-text'); expect(inputErrorText).toHaveTextContent( - 'Price accepts up to 1 decimal places' + 'Price must be a multiple of 0.1 for this market' ); }); }); diff --git a/libs/withdraws/src/lib/withdraw-form-container.spec.tsx b/libs/withdraws/src/lib/withdraw-form-container.spec.tsx index 2d59791a2..7887655f0 100644 --- a/libs/withdraws/src/lib/withdraw-form-container.spec.tsx +++ b/libs/withdraws/src/lib/withdraw-form-container.spec.tsx @@ -140,6 +140,7 @@ describe('WithdrawFormContainer', () => { positionDecimalPlaces: 0, state: Types.MarketState.STATE_SUSPENDED, tradingMode: Types.MarketTradingMode.TRADING_MODE_MONITORING_AUCTION, + tickSize: '1', fees: { __typename: 'Fees', factors: {