mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* 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
31 lines
1.1 KiB
TypeScript
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();
|
|
});
|