mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
* Fix address-copy-button.test.js * Fix connected-site-menu.js * Fix app-header.test.js * Fix product-tour-popover.test.js
This commit is contained in:
parent
18699ccb0e
commit
e05aec8502
@ -127,3 +127,6 @@ expect.extend({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Setup window.prompt
|
||||||
|
global.prompt = () => undefined;
|
||||||
|
@ -5,7 +5,7 @@ import mockState from '../../../../test/data/mock-state.json';
|
|||||||
import { SEND_STAGES } from '../../../ducks/send';
|
import { SEND_STAGES } from '../../../ducks/send';
|
||||||
import { AppHeader } from '.';
|
import { AppHeader } from '.';
|
||||||
|
|
||||||
const render = (stateChanges = {}, location = jest.fn()) => {
|
const render = (stateChanges = {}, location = {}) => {
|
||||||
const store = configureStore({
|
const store = configureStore({
|
||||||
...mockState,
|
...mockState,
|
||||||
activeTab: {
|
activeTab: {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
exports[`Connected Site Menu should render the site menu in connected state 1`] = `
|
exports[`Connected Site Menu should render the site menu in connected state 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="box multichain-connected-site-menu box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center box--background-color-background-default"
|
class="mm-box multichain-connected-site-menu mm-box--display-flex mm-box--justify-content-center mm-box--align-items-center"
|
||||||
data-testid="connection-menu"
|
data-testid="connection-menu"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
@ -27,7 +27,7 @@ exports[`Connected Site Menu should render the site menu in connected state 1`]
|
|||||||
style="bottom: 2px; right: -4px; z-index: 1;"
|
style="bottom: 2px; right: -4px; z-index: 1;"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="box multichain-connected-site-menu__badge box--flex-direction-row box--background-color-success-default box--rounded-full box--border-color-background-default box--border-width-3 box--border-style-solid"
|
class="mm-box multichain-connected-site-menu__badge mm-box--background-color-success-default mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-3 box--border-style-solid"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -40,7 +40,7 @@ exports[`Connected Site Menu should render the site menu in connected state 1`]
|
|||||||
exports[`Connected Site Menu should render the site menu in not connected state 1`] = `
|
exports[`Connected Site Menu should render the site menu in not connected state 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="box multichain-connected-site-menu box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center box--background-color-background-default"
|
class="mm-box multichain-connected-site-menu mm-box--display-flex mm-box--justify-content-center mm-box--align-items-center"
|
||||||
data-testid="connection-menu"
|
data-testid="connection-menu"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
@ -64,7 +64,7 @@ exports[`Connected Site Menu should render the site menu in not connected state
|
|||||||
style="bottom: 2px; right: -4px; z-index: 1;"
|
style="bottom: 2px; right: -4px; z-index: 1;"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="box multichain-connected-site-menu__badge box--flex-direction-row box--background-color-icon-alternative box--rounded-full box--border-color-background-default box--border-width-3 box--border-style-solid"
|
class="mm-box multichain-connected-site-menu__badge mm-box--background-color-icon-alternative mm-box--rounded-full mm-box--border-color-background-default mm-box--border-width-3 box--border-style-solid"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -77,7 +77,7 @@ exports[`Connected Site Menu should render the site menu in not connected state
|
|||||||
exports[`Connected Site Menu should render the site menu in not connected to current account state 1`] = `
|
exports[`Connected Site Menu should render the site menu in not connected to current account state 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
class="box multichain-connected-site-menu box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center box--background-color-background-default"
|
class="mm-box multichain-connected-site-menu mm-box--display-flex mm-box--justify-content-center mm-box--align-items-center"
|
||||||
data-testid="connection-menu"
|
data-testid="connection-menu"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
@ -101,7 +101,7 @@ exports[`Connected Site Menu should render the site menu in not connected to cur
|
|||||||
style="bottom: 4px; right: -1px; z-index: 1;"
|
style="bottom: 4px; right: -1px; z-index: 1;"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="box multichain-connected-site-menu__badge not-connected box--flex-direction-row box--background-color-background-default box--rounded-full box--border-color-success-default box--border-width-2 box--border-style-solid"
|
class="mm-box multichain-connected-site-menu__badge not-connected mm-box--background-color-background-default mm-box--rounded-full mm-box--border-color-success-default mm-box--border-width-2 box--border-style-solid"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,8 +20,8 @@ import {
|
|||||||
Icon,
|
Icon,
|
||||||
IconName,
|
IconName,
|
||||||
IconSize,
|
IconSize,
|
||||||
|
Box,
|
||||||
} from '../../component-library';
|
} from '../../component-library';
|
||||||
import Box from '../../ui/box';
|
|
||||||
import { getSelectedIdentity } from '../../../selectors';
|
import { getSelectedIdentity } from '../../../selectors';
|
||||||
import Tooltip from '../../ui/tooltip';
|
import Tooltip from '../../ui/tooltip';
|
||||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||||
@ -44,7 +44,6 @@ export const ConnectedSiteMenu = ({
|
|||||||
display={Display.Flex}
|
display={Display.Flex}
|
||||||
alignItems={AlignItems.center}
|
alignItems={AlignItems.center}
|
||||||
justifyContent={JustifyContent.center}
|
justifyContent={JustifyContent.center}
|
||||||
backgroundColor={BackgroundColor.backgroundDefault}
|
|
||||||
>
|
>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={
|
title={
|
||||||
|
@ -9,6 +9,7 @@ describe('DetectedTokensBanner', () => {
|
|||||||
description: 'Find your connected accounts and manage permissions here.',
|
description: 'Find your connected accounts and manage permissions here.',
|
||||||
currentStep: '1',
|
currentStep: '1',
|
||||||
totalSteps: '3',
|
totalSteps: '3',
|
||||||
|
closeMenu: jest.fn(),
|
||||||
};
|
};
|
||||||
it('should render correctly', () => {
|
it('should render correctly', () => {
|
||||||
const { getByTestId } = render(
|
const { getByTestId } = render(
|
||||||
|
Loading…
Reference in New Issue
Block a user