mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
UX: Multichain: Restore Flask support link and text (#19198)
* UX: Multichain: Restore Flask support link and text * Update test
This commit is contained in:
parent
51f6a29461
commit
7d7d09e469
@ -22,6 +22,9 @@ import { Menu, MenuItem } from '../../ui/menu';
|
||||
import { getEnvironmentType } from '../../../../app/scripts/lib/util';
|
||||
import { ENVIRONMENT_TYPE_FULLSCREEN } from '../../../../shared/constants/app';
|
||||
import { SUPPORT_LINK } from '../../../../shared/lib/ui-utils';
|
||||
///: BEGIN:ONLY_INCLUDE_IN(build-beta,build-flask)
|
||||
import { SUPPORT_REQUEST_LINK } from '../../../helpers/constants/common';
|
||||
///: END:ONLY_INCLUDE_IN
|
||||
|
||||
import { MetaMetricsContext } from '../../../contexts/metametrics';
|
||||
import {
|
||||
@ -59,6 +62,13 @@ export const GlobalMenu = ({ closeMenu, anchorElement }) => {
|
||||
const unreadNotificationsCount = useSelector(getUnreadNotificationsCount);
|
||||
///: END:ONLY_INCLUDE_IN
|
||||
|
||||
let supportText = t('support');
|
||||
let supportLink = SUPPORT_LINK;
|
||||
///: BEGIN:ONLY_INCLUDE_IN(build-beta,build-flask)
|
||||
supportText = t('needHelpSubmitTicket');
|
||||
supportLink = SUPPORT_REQUEST_LINK;
|
||||
///: END:ONLY_INCLUDE_IN
|
||||
|
||||
return (
|
||||
<Menu anchorElement={anchorElement} onHide={closeMenu}>
|
||||
<MenuItem
|
||||
@ -165,13 +175,13 @@ export const GlobalMenu = ({ closeMenu, anchorElement }) => {
|
||||
<MenuItem
|
||||
iconName={IconName.MessageQuestion}
|
||||
onClick={() => {
|
||||
global.platform.openTab({ url: SUPPORT_LINK });
|
||||
global.platform.openTab({ url: supportLink });
|
||||
trackEvent(
|
||||
{
|
||||
category: MetaMetricsEventCategory.Home,
|
||||
event: MetaMetricsEventName.SupportLinkClicked,
|
||||
properties: {
|
||||
url: SUPPORT_LINK,
|
||||
url: supportLink,
|
||||
location: 'Global Menu',
|
||||
},
|
||||
},
|
||||
@ -185,7 +195,7 @@ export const GlobalMenu = ({ closeMenu, anchorElement }) => {
|
||||
}}
|
||||
data-testid="global-menu-support"
|
||||
>
|
||||
{t('support')}
|
||||
{supportText}
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
iconName={IconName.Setting}
|
||||
|
@ -2,7 +2,6 @@ import React from 'react';
|
||||
import { renderWithProvider, fireEvent, waitFor } from '../../../../test/jest';
|
||||
import configureStore from '../../../store/store';
|
||||
import mockState from '../../../../test/data/mock-state.json';
|
||||
import { SUPPORT_LINK } from '../../../../shared/lib/ui-utils';
|
||||
import { GlobalMenu } from '.';
|
||||
|
||||
const render = () => {
|
||||
@ -49,9 +48,7 @@ describe('AccountListItem', () => {
|
||||
const { getByTestId } = render();
|
||||
fireEvent.click(getByTestId('global-menu-support'));
|
||||
await waitFor(() => {
|
||||
expect(global.platform.openTab).toHaveBeenCalledWith({
|
||||
url: SUPPORT_LINK,
|
||||
});
|
||||
expect(global.platform.openTab).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user