diff --git a/wallets/metamask/src/pages/HomePage/actions/renameAccount.ts b/wallets/metamask/src/pages/HomePage/actions/renameAccount.ts index 498ba64be..a659caa06 100644 --- a/wallets/metamask/src/pages/HomePage/actions/renameAccount.ts +++ b/wallets/metamask/src/pages/HomePage/actions/renameAccount.ts @@ -15,9 +15,8 @@ export async function renameAccount(page: Page, newAccountName: Account['name']) await page.locator(Selectors.accountMenu.accountButton).click() await page.locator(Selectors.accountMenu.renameAccountMenu.listItemButton).click() - await page.locator(Selectors.accountMenu.renameAccountMenu.listItemDetails).click() + await page.locator(Selectors.accountMenu.renameAccountMenu.listItemDetailButton).click() await page.locator(Selectors.accountMenu.renameAccountMenu.renameButton).click() await page.locator(Selectors.accountMenu.renameAccountMenu.renameInput).fill(newAccountName) - - await page.locator(Selectors.accountMenu.renameAccountMenu.renameConfirmButton).click() + await page.keyboard.press('Enter') } diff --git a/wallets/metamask/src/pages/HomePage/selectors/index.ts b/wallets/metamask/src/pages/HomePage/selectors/index.ts index 5341750be..0d9d78648 100644 --- a/wallets/metamask/src/pages/HomePage/selectors/index.ts +++ b/wallets/metamask/src/pages/HomePage/selectors/index.ts @@ -10,10 +10,9 @@ const addNewAccountMenu = { const renameAccountMenu = { listItemButton: `${accountMenuContainer} ${createDataTestSelector('account-list-item-menu-button')}`, - listItemDetails: `${accountMenuContainer} ${createDataTestSelector('account-list-menu-details')}`, - renameButton: `${accountMenuContainer} ${createDataTestSelector('editable-label-button')}`, - renameInput: `${accountMenuContainer} input`, - renameConfirmButton: `${accountMenuContainer} button.mm-button-icon`, + listItemDetailButton: `${createDataTestSelector('account-list-menu-details')}`, + renameButton: `${createDataTestSelector('editable-label-button')}`, + renameInput: `input`, } const importAccountMenu = {