mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* page layout * add interval filter * fix navigation * value formatting and test * fix: correct empty state message from 'pools' to 'hot contracts' * update screenshots * add disabled state to tag select and fix some bugs * fix screenshot * update select texts
24 lines
882 B
TypeScript
24 lines
882 B
TypeScript
import React from 'react';
|
|
|
|
import * as contractsMock from 'mocks/contracts/index';
|
|
import * as statsMock from 'mocks/stats/index';
|
|
import { test, expect } from 'playwright/lib';
|
|
import { getIntervalValueFromQuery } from 'ui/hotContracts/utils';
|
|
|
|
import HotContracts from './HotContracts';
|
|
|
|
test('base view +@mobile', async({ render, mockTextAd, mockApiResponse, mockEnvs }) => {
|
|
test.slow();
|
|
await mockEnvs([ [ 'NEXT_PUBLIC_VIEWS_TOKEN_SCAM_TOGGLE_ENABLED', 'true' ] ]);
|
|
await mockTextAd();
|
|
await mockApiResponse(
|
|
'general:stats_hot_contracts',
|
|
contractsMock.hotContractsResponse,
|
|
{ queryParams: { scale: getIntervalValueFromQuery(undefined) } },
|
|
);
|
|
await mockApiResponse('general:stats', { ...statsMock.base, coin_price: '3214.42' });
|
|
|
|
const component = await render(<HotContracts/>);
|
|
await expect(component).toHaveScreenshot({ timeout: 10_000 });
|
|
});
|