Commit 9fb08da3 authored by Max Alekseenko's avatar Max Alekseenko

add test

parent 291210de
import React from 'react'; import React from 'react';
import type { AddressMetadataInfo, AddressMetadataTagApi } from 'types/api/addressMetadata'; import type { AddressMetadataInfo, AddressMetadataTagApi } from 'types/api/addressMetadata';
import type { AddressParam } from 'types/api/addressParams';
import config from 'configs/app'; import config from 'configs/app';
import { protocolTagWithMeta } from 'mocks/metadata/address'; import { protocolTagWithMeta } from 'mocks/metadata/address';
...@@ -64,6 +65,25 @@ test.describe('blockscout provider', () => { ...@@ -64,6 +65,25 @@ test.describe('blockscout provider', () => {
await expect(component).toHaveScreenshot(); await expect(component).toHaveScreenshot();
}); });
test('with interpretation and recipient ENS domain', async({ render, mockApiResponse }) => {
const txData = {
...txMock.base,
to: {
...txMock.base.to,
hash: (txInterpretation.data.summaries[0].summary_template_variables.to_address.value as AddressParam).hash,
ens_domain_name: 'duckduck.eth',
},
};
const txWithEnsQuery = {
data: txData,
isPlaceholderData: false,
isError: false,
} as TxQuery;
await mockApiResponse('tx_interpretation', txInterpretation, { pathParams: { hash } });
const component = await render(<TxSubHeading hash={ hash } hasTag={ false } txQuery={ txWithEnsQuery }/>);
await expect(component).toHaveScreenshot();
});
test('with interpretation and view all link +@mobile', async({ render, mockApiResponse }) => { test('with interpretation and view all link +@mobile', async({ render, mockApiResponse }) => {
await mockApiResponse( await mockApiResponse(
'tx_interpretation', 'tx_interpretation',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment