Files
explore/ui/pages/ArbitrumL2Withdrawals.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

20 lines
803 B
TypeScript

import React from 'react';
import * as depositsMock from 'mocks/arbitrum/withdrawals';
import { ENVS_MAP } from 'playwright/fixtures/mockEnvs';
import { test, expect } from 'playwright/lib';
import ArbitrumL2Withdrawals from './ArbitrumL2Withdrawals';
test('base view +@mobile', async({ render, mockApiResponse, mockEnvs, mockTextAd }) => {
test.slow();
await mockTextAd();
await mockEnvs(ENVS_MAP.arbitrumRollup);
await mockApiResponse('general:arbitrum_l2_messages', depositsMock.baseResponse, { pathParams: { direction: 'from-rollup' } });
await mockApiResponse('general:arbitrum_l2_messages_count', 3971111, { pathParams: { direction: 'from-rollup' } });
const component = await render(<ArbitrumL2Withdrawals/>);
await expect(component).toHaveScreenshot({ timeout: 10_000 });
});