Files
explore/ui/crossChain/txs/TransactionsCrossChain.pw.tsx
tom goriunovandGitHub e6e83ee4e7 Add cross-chain transaction tracking and visualization (#3227)
* envs and feature setup

* home page layout

* cross-chain txs page

* cross-chain transfers page

* cross-chain transfers on tx page

* cross-chain messages on tx page

* cross-chain tx page

* cross-chain tx details token transfers

* stats and counters for lists

* migrate to new API version

* add swagger

* mobile lists

* placeholder views on address page

* tests

* fix adaptive tabs initial state when there is only one tab in the list

* tweaks

* bug fixes

* fix tests

* update screenshots

* migrate to new api version

* add chain label tooltip, copy button to txs in lists and same address highlight

* list views on address page

* fix tests

* fix links to current address in the list views

* update tooltips

* update tables layout

* review fixes

* fix spelling

* update screenshots

* update screenshot
2026-02-19 15:14:32 +01:00

45 lines
1.9 KiB
TypeScript

import * as crossChainConfigMock from 'mocks/crossChain/config';
import * as crossChainTransfersMock from 'mocks/crossChain/transfers';
import * as crossChainTxMock from 'mocks/crossChain/txs';
import { ENVS_MAP } from 'playwright/fixtures/mockEnvs';
import { test, expect } from 'playwright/lib';
import * as pwConfig from 'playwright/utils/config';
import TransactionsCrossChain from './TransactionsCrossChain';
test.describe('txs', () => {
test.slow();
test.beforeEach(async({ mockEnvs, mockApiResponse, mockAssetResponse }) => {
await mockEnvs([
...ENVS_MAP.crossChainTxs,
[ 'NEXT_PUBLIC_NETWORK_ID', crossChainConfigMock.config[0].id ],
]);
await mockApiResponse('interchainIndexer:messages', crossChainTxMock.listResponse);
await mockApiResponse('interchainIndexer:stats_common', { total_messages: 100, total_transfers: 101, timestamp: '2022-01-13T12:00:00.000Z' });
await mockApiResponse('interchainIndexer:stats_daily', { daily_messages: 42, daily_transfers: 55, date: '2022-01-13' });
await mockAssetResponse(crossChainConfigMock.config[0].logo as string, './playwright/mocks/duck.png');
await mockAssetResponse(crossChainConfigMock.config[1].logo as string, './playwright/mocks/goose.png');
await mockAssetResponse(crossChainTransfersMock.transferA.source_token.icon_url as string, './playwright/mocks/image_s.jpg');
});
test.describe('desktop', () => {
test.use({ viewport: pwConfig.viewport.xl });
test('base view +@dark-mode', async({ render }) => {
const component = await render(<TransactionsCrossChain/>);
await expect(component).toHaveScreenshot({ timeout: 30_000 });
});
});
test.describe('mobile', () => {
test.use({ viewport: pwConfig.viewport.mobile });
test('base view', async({ render }) => {
const component = await render(<TransactionsCrossChain/>);
await expect(component).toHaveScreenshot({ timeout: 30_000 });
});
});
});