Files
explore/ui/address/AddressInternalTxs.pw.tsx
tom goriunovandGitHub fae4990e1f API resource refactoring (#2699)
* add prefix to API resources

* fix pw tests

* refactor config

* remove unnecessary prefixes in resource names

* fixes

* update screenshots
2025-05-01 15:22:38 +02:00

27 lines
779 B
TypeScript

import { Box } from '@chakra-ui/react';
import React from 'react';
import * as internalTxsMock from 'mocks/txs/internalTxs';
import { test, expect } from 'playwright/lib';
import AddressInternalTxs from './AddressInternalTxs';
const ADDRESS_HASH = internalTxsMock.base.from.hash;
const hooksConfig = {
router: {
query: { hash: ADDRESS_HASH },
},
};
test('base view +@mobile', async({ render, mockApiResponse }) => {
test.slow();
await mockApiResponse('general:address_internal_txs', internalTxsMock.baseResponse, { pathParams: { hash: ADDRESS_HASH } });
const component = await render(
<Box pt={{ base: '134px', lg: 6 }}>
<AddressInternalTxs/>
</Box>,
{ hooksConfig },
);
await expect(component).toHaveScreenshot({ timeout: 10_000 });
});