-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'new-dawn' into feat/wait-for
- Loading branch information
Showing
6 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
wallets/metamask/src/pages/HomePage/actions/renameAccount.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { Page } from '@playwright/test' | ||
import Selectors from '../selectors' | ||
|
||
export async function renameAccount(page: Page, newAccountName: string) { | ||
await page.locator(Selectors.accountMenu.accountButton).click() | ||
await page.locator(Selectors.accountMenu.renameAccountMenu.listItemButton).nth(0).click() | ||
await page.locator(Selectors.threeDotsMenu.accountDetailsButton).click() | ||
await page.locator(Selectors.accountMenu.renameAccountMenu.renameButton).click() | ||
await page.locator(Selectors.accountMenu.renameAccountMenu.renameInput).fill(newAccountName) | ||
await page.locator(Selectors.accountMenu.renameAccountMenu.confirmRenameButton).click() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { testWithSynpress } from '@synthetixio/synpress-core' | ||
import { MetaMask, metaMaskFixtures } from '../../src' | ||
|
||
import basicSetup from '../wallet-setup/basic.setup' | ||
|
||
const test = testWithSynpress(metaMaskFixtures(basicSetup)) | ||
|
||
const { expect } = test | ||
|
||
test('should rename current account with specified name', async ({ context, metamaskPage }) => { | ||
const metamask = new MetaMask(context, metamaskPage, basicSetup.walletPassword) | ||
|
||
const accountName = 'Test Account' | ||
await metamask.renameAccount(accountName) | ||
|
||
await expect(metamaskPage.locator(metamask.homePage.selectors.accountMenu.accountButton)).toHaveText(accountName) | ||
}) |