1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-21 17:37:01 +01:00

Fix #19830 - UX: Multichain test linting (#19792)

* 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:
David Walsh 2023-07-04 07:00:09 -05:00 committed by GitHub
parent 18699ccb0e
commit e05aec8502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 9 deletions

View File

@ -127,3 +127,6 @@ expect.extend({
};
},
});
// Setup window.prompt
global.prompt = () => undefined;

View File

@ -5,7 +5,7 @@ import mockState from '../../../../test/data/mock-state.json';
import { SEND_STAGES } from '../../../ducks/send';
import { AppHeader } from '.';
const render = (stateChanges = {}, location = jest.fn()) => {
const render = (stateChanges = {}, location = {}) => {
const store = configureStore({
...mockState,
activeTab: {

View File

@ -3,7 +3,7 @@
exports[`Connected Site Menu should render the site menu in connected state 1`] = `
<div>
<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"
>
<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;"
>
<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>
@ -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`] = `
<div>
<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"
>
<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;"
>
<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>
@ -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`] = `
<div>
<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"
>
<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;"
>
<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>

View File

@ -20,8 +20,8 @@ import {
Icon,
IconName,
IconSize,
Box,
} from '../../component-library';
import Box from '../../ui/box';
import { getSelectedIdentity } from '../../../selectors';
import Tooltip from '../../ui/tooltip';
import { useI18nContext } from '../../../hooks/useI18nContext';
@ -44,7 +44,6 @@ export const ConnectedSiteMenu = ({
display={Display.Flex}
alignItems={AlignItems.center}
justifyContent={JustifyContent.center}
backgroundColor={BackgroundColor.backgroundDefault}
>
<Tooltip
title={

View File

@ -9,6 +9,7 @@ describe('DetectedTokensBanner', () => {
description: 'Find your connected accounts and manage permissions here.',
currentStep: '1',
totalSteps: '3',
closeMenu: jest.fn(),
};
it('should render correctly', () => {
const { getByTestId } = render(