mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
parent
39089e0f4c
commit
ba3f86400c
@ -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' });
|
||||
|
@ -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' });
|
||||
|
@ -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>
|
||||
|
@ -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();
|
||||
});
|
||||
|
||||
|
@ -1,4 +1,8 @@
|
||||
.multichain-account-menu {
|
||||
.multichain-account-menu-popover {
|
||||
.popover-content {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
&__list {
|
||||
max-height: 200px;
|
||||
overflow: auto;
|
||||
|
Loading…
Reference in New Issue
Block a user