mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* Show NFT image for token transfers Fixes #2547 * rewrite logic of loading NFT media * make amends to NftEntity * show original media size only in the modal * immutable envs * tests * fix fallback condition * fixes * fix one more test * Removing blockscout-ci-cd from helm repo --------- Co-authored-by: Nick Zenchik <[email protected]>
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import { Box } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import * as tokenInstanceMock from 'mocks/tokens/tokenInstance';
|
|
import * as tokenTransferMock from 'mocks/tokens/tokenTransfer';
|
|
import { test, expect, devices } from 'playwright/lib';
|
|
|
|
import TokenTransferList from './TokenTransferList';
|
|
|
|
test.use({ viewport: devices['iPhone 13 Pro'].viewport });
|
|
|
|
const data = [
|
|
{
|
|
...tokenTransferMock.erc20,
|
|
to: {
|
|
...tokenTransferMock.erc20.to,
|
|
hash: tokenTransferMock.erc721.to.hash,
|
|
},
|
|
},
|
|
tokenTransferMock.erc721,
|
|
tokenTransferMock.erc1155A,
|
|
tokenTransferMock.erc1155B,
|
|
tokenTransferMock.erc1155C,
|
|
tokenTransferMock.erc1155D,
|
|
];
|
|
|
|
test('without tx info', async({ render, mockAssetResponse }) => {
|
|
await mockAssetResponse(tokenInstanceMock.base.image_url as string, './playwright/mocks/image_s.jpg');
|
|
const component = await render(
|
|
<Box pt={{ base: '134px', lg: 6 }}>
|
|
<TokenTransferList
|
|
data={ data }
|
|
showTxInfo={ false }
|
|
/>
|
|
</Box>,
|
|
);
|
|
|
|
await expect(component).toHaveScreenshot();
|
|
});
|
|
|
|
test('with tx info', async({ render, mockAssetResponse }) => {
|
|
await mockAssetResponse(tokenInstanceMock.base.image_url as string, './playwright/mocks/image_s.jpg');
|
|
const component = await render(
|
|
<Box pt={{ base: '134px', lg: 6 }}>
|
|
<TokenTransferList
|
|
data={ data }
|
|
showTxInfo={ true }
|
|
/>
|
|
</Box>,
|
|
);
|
|
|
|
await expect(component).toHaveScreenshot();
|
|
});
|