1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

MenuItem: Fix layout of menu item with subtitle (#17650)

This commit is contained in:
David Walsh 2023-02-21 09:50:54 -06:00 committed by GitHub
parent 1f9b5a2293
commit 1e5f9da592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -109,7 +109,7 @@ describe('Dapp interactions', function () {
await driver.clickElement(
'[data-testid ="account-options-menu-button"]',
);
await driver.clickElement({ text: 'Connected sites', tag: 'span' });
await driver.clickElement({ text: 'Connected sites', tag: 'div' });
const connectedDapp1 = await driver.isElementPresent({
text: 'http://127.0.0.1:8080',
tag: 'bdi',

View File

@ -36,7 +36,7 @@ describe('Token Details', function () {
await driver.clickElement({ text: 'Add custom token', tag: 'button' });
await driver.clickElement({ text: 'Import tokens', tag: 'button' });
await driver.clickElement('[aria-label="Asset options"]');
await driver.clickElement({ text: 'Token details', tag: 'span' });
await driver.clickElement({ text: 'Token details', tag: 'div' });
const tokenAddressFound = {
text: tokenAddress,

View File

@ -20,8 +20,10 @@ const MenuItem = ({
{iconName ? (
<Icon name={iconName} size={ICON_SIZES.SM} marginRight={2} />
) : null}
<span>{children}</span>
{subtitle}
<div>
<div>{children}</div>
{subtitle ? <div>{subtitle}</div> : null}
</div>
</button>
);