mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* update csv export text * fix pw tests * base layout and customization for home page and search results page * refactor rest of the pages * refactor AppError * move header padding to layout * move nextjs utils to separate folder * combine PageServer and Page * make useQueryClientConfig hook * add tests * remove unused var * fix envs for pw * fix pw tests
28 lines
749 B
TypeScript
28 lines
749 B
TypeScript
import { Box } from '@chakra-ui/react';
|
|
import { test, expect } from '@playwright/experimental-ct-react';
|
|
import React from 'react';
|
|
|
|
import TestApp from 'playwright/TestApp';
|
|
import buildApiUrl from 'playwright/utils/buildApiUrl';
|
|
|
|
import LayoutHome from './LayoutHome';
|
|
|
|
const API_URL = buildApiUrl('homepage_indexing_status');
|
|
|
|
test('base view +@mobile', async({ mount, page }) => {
|
|
await page.route(API_URL, (route) => route.fulfill({
|
|
status: 200,
|
|
body: JSON.stringify({ finished_indexing_blocks: false, indexed_blocks_ratio: 0.1 }),
|
|
}));
|
|
|
|
const component = await mount(
|
|
<TestApp>
|
|
<LayoutHome>
|
|
<Box pt={ 10 }>Error</Box>
|
|
</LayoutHome>
|
|
</TestApp>,
|
|
);
|
|
|
|
await expect(component).toHaveScreenshot();
|
|
});
|