-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9006 from LedgerHQ/bugfix/rename-account-issue
🐛 Rename account and starred accounts now fixed on LLM and LLD
- Loading branch information
Showing
6 changed files
with
93 additions
and
3 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"ledger-live-desktop": minor | ||
"@ledgerhq/live-wallet": minor | ||
--- | ||
|
||
LLD - Fix rename account issue |
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
30 changes: 30 additions & 0 deletions
30
apps/ledger-live-desktop/tests/specs/accounts/rename.account.spec.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,30 @@ | ||
import test from "../../fixtures/common"; | ||
import { AccountsPage } from "../../page/accounts.page"; | ||
import { Layout } from "../../component/layout.component"; | ||
import fsPromises from "fs/promises"; | ||
import { expect } from "@playwright/test"; | ||
|
||
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); | ||
|
||
test.use({ userdata: "accountCosmos" }); | ||
|
||
test("Rename account", async ({ app, page, userdataFile, electronApp }) => { | ||
const getUserdata = async () => { | ||
const jsonFile = await fsPromises.readFile(userdataFile, "utf-8"); | ||
return JSON.parse(jsonFile); | ||
}; | ||
const layout = new Layout(page); | ||
await layout.goToAccounts(); | ||
const accountsPage = new AccountsPage(page); | ||
await accountsPage.navigateToAccountByName("Cosmos 1"); | ||
|
||
const newName = "New account name"; | ||
await app.account.expectAccountVisibility("Cosmos 1"); | ||
await app.account.renameAccount(newName); | ||
await app.account.expectAccountVisibility(newName); | ||
await sleep(2000); | ||
await electronApp.close(); | ||
await sleep(2000); | ||
const userData = await getUserdata(); | ||
expect(userData.data.wallet.accountNames[0][1]).toBe(newName); | ||
}); |
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