Commit d84e7e00 authored by isstuev's avatar isstuev

configure blob txs in block details

parent ca10f8ab
import { test, expect } from '@playwright/experimental-ct-react';
import React from 'react'; import React from 'react';
import * as blockMock from 'mocks/blocks/block'; import * as blockMock from 'mocks/blocks/block';
import contextWithEnvs from 'playwright/fixtures/contextWithEnvs'; import contextWithEnvs from 'playwright/fixtures/contextWithEnvs';
import { test, expect } from 'playwright/lib';
import TestApp from 'playwright/TestApp'; import TestApp from 'playwright/TestApp';
import * as configs from 'playwright/utils/configs'; import * as configs from 'playwright/utils/configs';
...@@ -51,7 +51,10 @@ test('genesis block', async({ mount, page }) => { ...@@ -51,7 +51,10 @@ test('genesis block', async({ mount, page }) => {
await expect(component).toHaveScreenshot(); await expect(component).toHaveScreenshot();
}); });
test('with blob txs', async({ mount, page }) => { test('with blob txs', async({ mount, page, mockEnvs }) => {
await mockEnvs([
[ 'NEXT_PUBLIC_DATA_AVAILABILITY_ENABLED', 'true' ],
]);
const query = { const query = {
data: blockMock.withBlobTxs, data: blockMock.withBlobTxs,
isPending: false, isPending: false,
......
...@@ -127,7 +127,7 @@ const BlockDetails = ({ query }: Props) => { ...@@ -127,7 +127,7 @@ const BlockDetails = ({ query }: Props) => {
</LinkInternal> </LinkInternal>
); );
const blockBlobTxsNum = data.blob_tx_count ? ( const blockBlobTxsNum = (config.features.dataAvailability.isEnabled && data.blob_tx_count) ? (
<> <>
<span> and </span> <span> and </span>
<LinkInternal href={ route({ pathname: '/block/[height_or_hash]', query: { height_or_hash: heightOrHash, tab: 'blob_txs' } }) }> <LinkInternal href={ route({ pathname: '/block/[height_or_hash]', query: { height_or_hash: heightOrHash, tab: 'blob_txs' } }) }>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment