Files
explore/ui/pages/BeaconChainDeposits.pw.tsx
Igor StuevandGitHub 5416a636a4 beacon deposits (#2947)
* beacon deposits start

* some fixes

* test

* counters

* conflict fix

* fix mock
2025-08-22 12:11:54 +02:00

29 lines
1.1 KiB
TypeScript

import React from 'react';
import { data as depositsData } from 'mocks/deposits/deposits';
import { ENVS_MAP } from 'playwright/fixtures/mockEnvs';
import { test, expect, devices } from 'playwright/lib';
import BeaconChainDeposits from './BeaconChainDeposits';
test('base view', async({ render, mockEnvs, mockTextAd, mockApiResponse }) => {
await mockEnvs(ENVS_MAP.beaconChain);
await mockTextAd();
await mockApiResponse('general:deposits', depositsData);
await mockApiResponse('general:deposits_counters', { deposits_count: '111111' });
const component = await render(<BeaconChainDeposits/>);
await expect(component).toHaveScreenshot();
});
test.describe('mobile', () => {
test.use({ viewport: devices['iPhone 13 Pro'].viewport });
test('base view', async({ render, mockEnvs, mockTextAd, mockApiResponse }) => {
await mockEnvs(ENVS_MAP.beaconChain);
await mockTextAd();
await mockApiResponse('general:deposits', depositsData);
await mockApiResponse('general:deposits_counters', { deposits_count: '111111' });
const component = await render(<BeaconChainDeposits/>);
await expect(component).toHaveScreenshot();
});
});