mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* Smart contracts: get supported languages for filter from the API instead of ENV Resolves #3158 * fix ts and test * add test.slow() to Block test
19 lines
867 B
TypeScript
19 lines
867 B
TypeScript
import React from 'react';
|
|
|
|
import { verifiedContractsCountersMock } from 'mocks/contracts/counters';
|
|
import * as verifiedContractsMock from 'mocks/contracts/index';
|
|
import { test, expect } from 'playwright/lib';
|
|
|
|
import VerifiedContracts from './VerifiedContracts';
|
|
|
|
test('base view +@mobile', async({ render, mockTextAd, mockApiResponse, mockEnvs }) => {
|
|
test.slow();
|
|
await mockEnvs([ [ 'NEXT_PUBLIC_STATS_API_HOST', '' ] ]);
|
|
await mockTextAd();
|
|
await mockApiResponse('general:verified_contracts', verifiedContractsMock.baseResponse);
|
|
await mockApiResponse('general:verified_contracts_counters', verifiedContractsCountersMock);
|
|
await mockApiResponse('general:config_contract_languages', { languages: [ 'solidity', 'vyper' ] });
|
|
const component = await render(<VerifiedContracts/>);
|
|
await expect(component).toHaveScreenshot({ timeout: 10_000 });
|
|
});
|