mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* ENV preset for zilliqa * add zilliqa fields to block view * [skip ci] fix typo * fix accordion styles * [skip ci] make signers required again * change default format of Raw Input for Scilla contract to UTF-8 * add default type option to log item data
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import { Grid } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import type { ZilliqaQuorumCertificate } from 'types/api/block';
|
|
|
|
import * as blockMock from 'mocks/blocks/block';
|
|
import { test, expect } from 'playwright/lib';
|
|
|
|
import BlockDetailsZilliqaQuorumCertificate from './BlockDetailsZilliqaQuorumCertificate';
|
|
|
|
test('quorum certificate', async({ render }) => {
|
|
const component = await render(
|
|
<Grid
|
|
columnGap={ 8 }
|
|
rowGap={{ base: 3, lg: 3 }}
|
|
templateColumns={{ base: 'minmax(0, 1fr)', lg: 'minmax(min-content, 200px) minmax(0, 1fr)' }}
|
|
overflow="hidden"
|
|
>
|
|
<BlockDetailsZilliqaQuorumCertificate data={ blockMock.zilliqaWithAggregateQuorumCertificate.zilliqa?.quorum_certificate as ZilliqaQuorumCertificate }/>
|
|
</Grid>,
|
|
);
|
|
await expect(component).toHaveScreenshot();
|
|
});
|
|
|
|
test('aggregated quorum certificate +@mobile', async({ render }) => {
|
|
const component = await render(
|
|
<Grid
|
|
columnGap={ 8 }
|
|
rowGap={{ base: 3, lg: 3 }}
|
|
templateColumns={{ base: 'minmax(0, 1fr)', lg: 'minmax(min-content, 200px) minmax(0, 1fr)' }}
|
|
overflow="hidden"
|
|
>
|
|
<BlockDetailsZilliqaQuorumCertificate
|
|
data={ blockMock.zilliqaWithAggregateQuorumCertificate.zilliqa?.aggregate_quorum_certificate as ZilliqaQuorumCertificate }
|
|
/>
|
|
</Grid>,
|
|
);
|
|
await component.getByRole('button', { name: 'Nested quorum certificates' }).click();
|
|
|
|
await expect(component).toHaveScreenshot();
|
|
});
|