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

Fix #19609 - Prevent rounded corners in account menu (#19615)

This commit is contained in:
David Walsh 2023-06-20 08:38:24 -05:00 committed by GitHub
parent 39089e0f4c
commit ba3f86400c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 10 deletions

View File

@ -42,7 +42,7 @@ describe('Add account', function () {
await driver.clickElement('[data-testid="account-menu-icon"]');
await driver.clickElement(
'[data-testid="multichain-account-menu-add-account"]',
'[data-testid="multichain-account-menu-popover-add-account"]',
);
await driver.fill('[placeholder="Account 2"]', '2nd account');
@ -84,7 +84,7 @@ describe('Add account', function () {
// Create 2nd account
await driver.clickElement('[data-testid="account-menu-icon"]');
await driver.clickElement(
'[data-testid="multichain-account-menu-add-account"]',
'[data-testid="multichain-account-menu-popover-add-account"]',
);
await driver.fill('[placeholder="Account 2"]', '2nd account');
await driver.clickElement({ text: 'Create', tag: 'button' });
@ -188,7 +188,7 @@ describe('Add account', function () {
await driver.clickElement('[data-testid="account-menu-icon"]');
await driver.clickElement(
'[data-testid="multichain-account-menu-add-account"]',
'[data-testid="multichain-account-menu-popover-add-account"]',
);
await driver.fill('[placeholder="Account 2"]', '2nd account');
await driver.clickElement({ text: 'Create', tag: 'button' });

View File

@ -36,7 +36,7 @@ async function loadNewAccount() {
await driver.clickElement('[data-testid="account-menu-icon"]');
const timestampBeforeAction = new Date();
await driver.clickElement(
'[data-testid="multichain-account-menu-add-account"]',
'[data-testid="multichain-account-menu-popover-add-account"]',
);
await driver.fill('[placeholder="Account 2"]', '2nd account');
await driver.clickElement({ text: 'Create', tag: 'button' });

View File

@ -101,6 +101,7 @@ export const AccountListMenu = ({ onClose }) => {
centerTitle
onClose={onClose}
onBack={actionMode === '' ? null : () => setActionMode('')}
className="multichain-account-menu-popover"
>
{actionMode === 'add' ? (
<Box paddingLeft={4} paddingRight={4} paddingBottom={4} paddingTop={0}>
@ -129,7 +130,7 @@ export const AccountListMenu = ({ onClose }) => {
</Box>
) : null}
{actionMode === '' ? (
<Box className="multichain-account-menu">
<Box>
{/* Search box */}
{accounts.length > 1 ? (
<Box
@ -152,13 +153,13 @@ export const AccountListMenu = ({ onClose }) => {
</Box>
) : null}
{/* Account list block */}
<Box className="multichain-account-menu__list">
<Box className="multichain-account-menu-popover__list">
{searchResults.length === 0 && searchQuery !== '' ? (
<Text
paddingLeft={4}
paddingRight={4}
color={TextColor.textMuted}
data-testid="multichain-account-menu-no-results"
data-testid="multichain-account-menu-popover-no-results"
>
{t('noAccountsFound')}
</Text>
@ -208,7 +209,7 @@ export const AccountListMenu = ({ onClose }) => {
});
setActionMode('add');
}}
data-testid="multichain-account-menu-add-account"
data-testid="multichain-account-menu-popover-add-account"
>
{t('addAccount')}
</ButtonLink>

View File

@ -101,7 +101,7 @@ describe('AccountListMenu', () => {
);
expect(filteredListItems).toHaveLength(0);
expect(
getByTestId('multichain-account-menu-no-results'),
getByTestId('multichain-account-menu-popover-no-results'),
).toBeInTheDocument();
});

View File

@ -1,4 +1,8 @@
.multichain-account-menu {
.multichain-account-menu-popover {
.popover-content {
border-radius: 0;
}
&__list {
max-height: 200px;
overflow: auto;