Files
tom goriunovandGitHub 932add9d96 Change zero to <0.001 value within different pages (#3150)
* basic components and address page refactoring

* second part of refactoring

* third part of refactoring

* NativeCoinValue component

* more refactoring

* rename TruncatedValue into TruncatedText

* minor fixes

* refactor block details

* fix layout of value and fee in tx table

* update screenshots

* different units for tooltip and stats widget small value fix

* update screenshots

* update tx table screenshot

* fix copy button vertical alignment
2025-12-05 16:04:27 +01:00

31 lines
1.1 KiB
TypeScript

import React from 'react';
import * as txMock from 'mocks/txs/tx';
import { test, expect } from 'playwright/lib';
import TxFee from './TxFee';
test.use({ viewport: { width: 300, height: 100 } });
test('base view', async({ render }) => {
const component = await render(<TxFee tx={ txMock.base }/>);
await expect(component).toHaveScreenshot();
});
test('no usd value', async({ render }) => {
const component = await render(<TxFee tx={ txMock.base } accuracy={ 3 } noUsd/>);
await expect(component).toHaveScreenshot();
});
test('celo gas token', async({ render, mockAssetResponse }) => {
await mockAssetResponse(txMock.celoTxn.celo?.gas_token?.icon_url as string, './playwright/mocks/image_svg.svg');
const component = await render(<TxFee tx={ txMock.celoTxn }/>);
await expect(component).toHaveScreenshot();
});
test('stability token', async({ render, mockAssetResponse }) => {
await mockAssetResponse(txMock.stabilityTx.stability_fee?.token.icon_url as string, './playwright/mocks/image_svg.svg');
const component = await render(<TxFee tx={ txMock.stabilityTx }/>);
await expect(component).toHaveScreenshot();
});