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

34 lines
1.2 KiB
TypeScript

import React from 'react';
import * as messagesMock from 'mocks/scroll/messages';
import { ENVS_MAP } from 'playwright/fixtures/mockEnvs';
import { test, expect, devices } from 'playwright/lib';
import ScrollL2Withdrawals from './ScrollL2Withdrawals';
test('base view', async({ render, mockApiResponse, mockEnvs, mockTextAd }) => {
await mockTextAd();
await mockEnvs(ENVS_MAP.scrollRollup);
await mockApiResponse('general:scroll_l2_withdrawals', messagesMock.baseResponse);
await mockApiResponse('general:scroll_l2_withdrawals_count', 3971111);
const component = await render(<ScrollL2Withdrawals/>);
await expect(component).toHaveScreenshot();
});
test.describe('mobile', () => {
test.use({ viewport: devices['iPhone 13 Pro'].viewport });
test('base view', async({ render, mockApiResponse, mockEnvs, mockTextAd }) => {
await mockTextAd();
await mockEnvs(ENVS_MAP.scrollRollup);
await mockApiResponse('general:scroll_l2_withdrawals', messagesMock.baseResponse);
await mockApiResponse('general:scroll_l2_withdrawals_count', 3971111);
const component = await render(<ScrollL2Withdrawals/>);
await expect(component).toHaveScreenshot();
});
});