diff --git a/packages/cardano/src/wallet/lib/__tests__/get-inputs-value.test.ts b/packages/cardano/src/wallet/lib/__tests__/get-inputs-value.test.ts index 0a1efcee1..c94847ee2 100644 --- a/packages/cardano/src/wallet/lib/__tests__/get-inputs-value.test.ts +++ b/packages/cardano/src/wallet/lib/__tests__/get-inputs-value.test.ts @@ -250,7 +250,7 @@ describe('Testing getTxInputsValueAndAddress function', () => { ]); const result = getTxInputsValueAndAddress( - Array.from({ length: 30 }).map((_, index) => ({ index, txId: 'txId1' }) as unknown as Cardano.TxIn), + Array.from({ length: 30 }).map((_, index) => ({ index, txId: 'txId1' } as unknown as Cardano.TxIn)), { transactionsByHashes } as unknown as ChainHistoryProvider, @@ -285,7 +285,7 @@ describe('Testing getTxInputsValueAndAddress function', () => { ); const result = getTxInputsValueAndAddress( - Array.from({ length: 30 }).map((_, index) => ({ index: 0, txId: `txId${index}` }) as Cardano.TxIn), + Array.from({ length: 30 }).map((_, index) => ({ index: 0, txId: `txId${index}` } as Cardano.TxIn)), { transactionsByHashes } as unknown as ChainHistoryProvider, diff --git a/packages/common/src/ui/components/CollapsablePanel/__tests__/CollapsablePanel.test.tsx b/packages/common/src/ui/components/CollapsablePanel/__tests__/CollapsablePanel.test.tsx index e07a218f8..596bd718e 100644 --- a/packages/common/src/ui/components/CollapsablePanel/__tests__/CollapsablePanel.test.tsx +++ b/packages/common/src/ui/components/CollapsablePanel/__tests__/CollapsablePanel.test.tsx @@ -22,7 +22,7 @@ describe('CollapsablePanel', () => { ); const clickable = queryByRole('button'); act(() => { - fireEvent.click(clickable); + clickable && fireEvent.click(clickable); }); expect(queryByTestId('test-content')).toBeInTheDocument(); }); diff --git a/packages/common/src/ui/components/Drawer/__tests__/DrawerNavigation.test.tsx b/packages/common/src/ui/components/Drawer/__tests__/DrawerNavigation.test.tsx index c36f91036..3918a03c4 100644 --- a/packages/common/src/ui/components/Drawer/__tests__/DrawerNavigation.test.tsx +++ b/packages/common/src/ui/components/Drawer/__tests__/DrawerNavigation.test.tsx @@ -15,7 +15,7 @@ describe('DrawerNavigation', () => { const { queryByTestId } = render(); const backButton = queryByTestId('navigation-button-arrow'); expect(backButton).toBeInTheDocument(); - fireEvent.click(backButton); + backButton && fireEvent.click(backButton); expect(onClick).toHaveBeenCalled(); }); test('shows close button if on click function is defined', () => { @@ -23,7 +23,7 @@ describe('DrawerNavigation', () => { const { queryByTestId } = render(); const closeButton = queryByTestId('navigation-button-cross'); expect(closeButton).toBeInTheDocument(); - fireEvent.click(closeButton); + closeButton && fireEvent.click(closeButton); expect(onClick).toHaveBeenCalled(); }); test('shows left actions if passed as props instead of back arrow', () => { diff --git a/packages/common/src/ui/components/Form/Input/__tests__/Input.test.tsx b/packages/common/src/ui/components/Form/Input/__tests__/Input.test.tsx index e9729638c..060a0c4a4 100644 --- a/packages/common/src/ui/components/Form/Input/__tests__/Input.test.tsx +++ b/packages/common/src/ui/components/Form/Input/__tests__/Input.test.tsx @@ -15,7 +15,7 @@ describe('Input', () => { const input = queryByTestId('input-test'); expect(input).toHaveValue(''); act(() => { - fireEvent.change(input, { target: { value: 'new value' } }); + input && fireEvent.change(input, { target: { value: 'new value' } }); }); expect(input).toHaveValue('new value'); expect(onChange).toHaveBeenCalled(); diff --git a/packages/common/src/ui/components/Form/TextArea/__tests__/TextArea.test.tsx b/packages/common/src/ui/components/Form/TextArea/__tests__/TextArea.test.tsx index bc17123d7..6bc72eb5a 100644 --- a/packages/common/src/ui/components/Form/TextArea/__tests__/TextArea.test.tsx +++ b/packages/common/src/ui/components/Form/TextArea/__tests__/TextArea.test.tsx @@ -15,7 +15,7 @@ describe('TextArea', () => { const area = queryByTestId('text-area-test'); expect(area).toHaveValue(''); act(() => { - fireEvent.change(area, { target: { value: 'new value' } }); + area && fireEvent.change(area, { target: { value: 'new value' } }); }); expect(area).toHaveValue('new value'); expect(onChange).toHaveBeenCalled(); @@ -24,7 +24,8 @@ describe('TextArea', () => { const onBlur = jest.fn(); const { queryByTestId } = render(