mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Quick fix for test
This commit is contained in:
parent
e8074f058a
commit
73307fdd2e
@ -3,8 +3,8 @@ import React, { useEffect } from 'react';
|
|||||||
import { EditGasModes, PriorityLevels } from '../../../../shared/constants/gas';
|
import { EditGasModes, PriorityLevels } from '../../../../shared/constants/gas';
|
||||||
import {
|
import {
|
||||||
AlignItems,
|
AlignItems,
|
||||||
DISPLAY,
|
Display,
|
||||||
FLEX_DIRECTION,
|
FlexDirection,
|
||||||
TextVariant,
|
TextVariant,
|
||||||
} from '../../../helpers/constants/design-system';
|
} from '../../../helpers/constants/design-system';
|
||||||
import { getAppIsLoading } from '../../../selectors';
|
import { getAppIsLoading } from '../../../selectors';
|
||||||
@ -97,20 +97,14 @@ const CancelSpeedupPopover = () => {
|
|||||||
<div className="cancel-speedup-popover__wrapper">
|
<div className="cancel-speedup-popover__wrapper">
|
||||||
<Text
|
<Text
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
variant={TextVariant.bodySm}
|
variant={TextVariant.bodySm}
|
||||||
marginBottom={2}
|
marginBottom={2}
|
||||||
paddingBottom={2}
|
paddingBottom={2}
|
||||||
className="cancel-speedup-popover__description"
|
className="cancel-speedup-popover__description"
|
||||||
>
|
>
|
||||||
{t('cancelSpeedUpLabel', [
|
{t('cancelSpeedUpLabel', [
|
||||||
<Text
|
<strong key="cancelSpeedupCancel">{t('replace')}</strong>,
|
||||||
as="strong"
|
|
||||||
variant={TextVariant.bodySm}
|
|
||||||
key="cancelSpeedupCancel"
|
|
||||||
>
|
|
||||||
{t('replace')}
|
|
||||||
</Text>,
|
|
||||||
])}
|
])}
|
||||||
<InfoTooltip
|
<InfoTooltip
|
||||||
position="top"
|
position="top"
|
||||||
@ -135,17 +129,17 @@ const CancelSpeedupPopover = () => {
|
|||||||
/>
|
/>
|
||||||
</Text>
|
</Text>
|
||||||
<Box
|
<Box
|
||||||
display={DISPLAY.FLEX}
|
display={Display.Flex}
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
flexDirection={FLEX_DIRECTION.COLUMN}
|
flexDirection={FlexDirection.Column}
|
||||||
marginTop={2}
|
marginTop={2}
|
||||||
>
|
>
|
||||||
<Box className="cancel-speedup-popover__edit-gas-button">
|
<div className="cancel-speedup-popover__edit-gas-button">
|
||||||
{!appIsLoading && <EditGasFeeButton />}
|
{!appIsLoading && <EditGasFeeButton />}
|
||||||
</Box>
|
</div>
|
||||||
<Box className="cancel-speedup-popover__gas-details">
|
<div className="cancel-speedup-popover__gas-details">
|
||||||
<GasDetailsItem />
|
<GasDetailsItem />
|
||||||
</Box>
|
</div>
|
||||||
</Box>
|
</Box>
|
||||||
<Button onClick={submitTransactionChange}>{t('submit')}</Button>
|
<Button onClick={submitTransactionChange}>{t('submit')}</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,7 +125,7 @@ describe('CancelSpeedupPopover', () => {
|
|||||||
it('information tooltip should contain the correct text if editGasMode is cancel', async () => {
|
it('information tooltip should contain the correct text if editGasMode is cancel', async () => {
|
||||||
await act(async () => render());
|
await act(async () => render());
|
||||||
expect(
|
expect(
|
||||||
InfoTooltip.mock.calls[0][0].contentText.props.children[0],
|
InfoTooltip.mock.calls[0][0].contentText.props.children[0].props.children,
|
||||||
).toStrictEqual(
|
).toStrictEqual(
|
||||||
'To Cancel a transaction the gas fee must be increased by at least 10% for it to be recognized by the network.',
|
'To Cancel a transaction the gas fee must be increased by at least 10% for it to be recognized by the network.',
|
||||||
);
|
);
|
||||||
@ -134,7 +134,7 @@ describe('CancelSpeedupPopover', () => {
|
|||||||
it('information tooltip should contain the correct text if editGasMode is speedup', async () => {
|
it('information tooltip should contain the correct text if editGasMode is speedup', async () => {
|
||||||
await act(async () => render({ editGasMode: EditGasModes.speedUp }));
|
await act(async () => render({ editGasMode: EditGasModes.speedUp }));
|
||||||
expect(
|
expect(
|
||||||
InfoTooltip.mock.calls[0][0].contentText.props.children[0],
|
InfoTooltip.mock.calls[0][0].contentText.props.children[0].props.children,
|
||||||
).toStrictEqual(
|
).toStrictEqual(
|
||||||
'To Speed up a transaction the gas fee must be increased by at least 10% for it to be recognized by the network.',
|
'To Speed up a transaction the gas fee must be increased by at least 10% for it to be recognized by the network.',
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user