fix: transfer fee component test

This commit is contained in:
Madalina Raicu
2023-04-04 18:16:48 +01:00
parent 19a9e17a9c
commit 4e2e9db4a0
2 changed files with 5 additions and 1 deletions
@@ -165,6 +165,7 @@ describe('TransferFee', () => {
const props = {
amount: '200',
feeFactor: '0.001',
fee: '0.2',
};
it('calculates and renders the transfer fee', () => {
render(<TransferFee {...props} />);
@@ -174,6 +175,9 @@ describe('TransferFee', () => {
.toFixed();
const total = new BigNumber(props.amount).plus(expected).toFixed();
expect(screen.getByTestId('transfer-fee')).toHaveTextContent(expected);
expect(screen.getByTestId('transfer-amount')).toHaveTextContent(
props.amount
);
expect(screen.getByTestId('total-transfer-fee')).toHaveTextContent(total);
});
});
+1 -1
View File
@@ -305,7 +305,7 @@ export const TransferFee = ({
</Tooltip>
<div
data-testid="total-transfer-fee"
data-testid="transfer-amount"
className="text-neutral-500 dark:text-neutral-300"
>
{amount}