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

21 lines
905 B
TypeScript

import React from 'react';
import { outputRootsData } from 'mocks/optimism/outputRoots';
import { ENVS_MAP } from 'playwright/fixtures/mockEnvs';
import { test, expect } from 'playwright/lib';
import OptimisticL2OutputRoots from './OptimisticL2OutputRoots';
test('base view +@mobile', async({ render, mockEnvs, mockTextAd, mockApiResponse }) => {
// test on mobile is flaky
// my assumption is there is not enough time to calculate hashes truncation so component is unstable
// so I raised the test timeout to check if it helps
test.slow();
await mockEnvs(ENVS_MAP.optimisticRollup);
await mockTextAd();
await mockApiResponse('general:optimistic_l2_output_roots', outputRootsData);
await mockApiResponse('general:optimistic_l2_output_roots_count', 9927);
const component = await render(<OptimisticL2OutputRoots/>);
await expect(component).toHaveScreenshot({ timeout: 10_000 });
});