diff --git a/apps/ledger-live-desktop/tests/page/account.page.ts b/apps/ledger-live-desktop/tests/page/account.page.ts index de9d0c573cea..b3cfc535c4c7 100644 --- a/apps/ledger-live-desktop/tests/page/account.page.ts +++ b/apps/ledger-live-desktop/tests/page/account.page.ts @@ -29,8 +29,7 @@ export class AccountPage extends AppPage { private closeModal = this.page.getByTestId("modal-close-button"); private accountbutton = (accountName: string) => this.page.getByRole("button", { name: `${accountName}` }); - private tokenRow = (tokenTicker: string) => - this.page.locator(`data-test-id=token-row-${tokenTicker}`); + private tokenRow = (tokenTicker: string) => this.page.getByTestId(`token-row-${tokenTicker}`); private addTokenButton = this.page.getByRole("button", { name: "Add token" }); @step("Navigate to token $0") diff --git a/apps/ledger-live-desktop/tests/page/modal/add.account.modal.ts b/apps/ledger-live-desktop/tests/page/modal/add.account.modal.ts index fd674f375f31..41be1b8a2d58 100644 --- a/apps/ledger-live-desktop/tests/page/modal/add.account.modal.ts +++ b/apps/ledger-live-desktop/tests/page/modal/add.account.modal.ts @@ -10,8 +10,8 @@ export class AddAccountModal extends Modal { private accountsList = this.page.getByTestId("add-accounts-step-import-accounts-list"); private stopButton = this.page.getByTestId("add-accounts-import-stop-button"); private doneButton = this.page.getByTestId("add-accounts-finish-close-button"); - readonly closeButton = this.page.locator("data-test-id=modal-close-button"); - private infoBox = this.page.locator("data-test-id=add-token-infoBox"); + readonly closeButton = this.page.getByTestId("modal-close-button"); + private infoBox = this.page.getByTestId("add-token-infoBox"); private successAddLabel = this.page.locator("text=Account added successfully"); private selectTokenNetwork = (token: Token) => this.page @@ -19,7 +19,7 @@ export class AddAccountModal extends Modal { name: `${token.tokenName} (${token.tokenTicker}) ${token.tokenNetwork}`, }) .locator("span"); - readonly continueButton = this.page.locator("data-test-id=modal-continue-button"); + readonly continueButton = this.page.getByTestId("modal-continue-button"); @step("Select token $0") async selectToken(token: Token) { diff --git a/apps/ledger-live-desktop/tests/specs/speculos/erc20.spec.ts b/apps/ledger-live-desktop/tests/specs/speculos/erc20.spec.ts deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/apps/ledger-live-desktop/tests/specs/speculos/subAccount.spec.ts b/apps/ledger-live-desktop/tests/specs/speculos/subAccount.spec.ts index d8eb2d7607cc..b3dba3243c21 100644 --- a/apps/ledger-live-desktop/tests/specs/speculos/subAccount.spec.ts +++ b/apps/ledger-live-desktop/tests/specs/speculos/subAccount.spec.ts @@ -1,7 +1,6 @@ import test from "../../fixtures/common"; import { Token } from "../../enum/Tokens"; import { specs } from "../../utils/speculos"; -import { Application } from "tests/page"; import { addTmsLink } from "tests/fixtures/common"; const tokens: Token[] = [ @@ -25,7 +24,7 @@ const tokensReceive: Token[] = [ ]; for (const [i, token] of tokens.entries()) { - test.describe.parallel("Add subAccount without parent", () => { + test.describe("Add subAccount without parent", () => { test.use({ userdata: "skip-onboarding", testName: `add subAccount without parent (${token.tokenName})`, @@ -34,12 +33,10 @@ for (const [i, token] of tokens.entries()) { }); test(`Add Sub Account without parent (${token.parentAccount.currency.uiName})`, async ({ - page, + app, }) => { addTmsLink(["B2CQA-2448", "B2CQA-1079"]); - const app = new Application(page); - await app.portfolio.openAddAccountModal(); await app.addAccount.expectModalVisiblity(); @@ -67,12 +64,10 @@ for (const [i, token] of tokensReceive.entries()) { }); test(`[${token.tokenName}] Add subAccount when parent exists (${token.tokenNetwork})`, async ({ - page, + app, }) => { addTmsLink(["B2CQA-640"]); - const app = new Application(page); - await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName(token.parentAccount.accountName); await app.account.expectAccountVisibility(token.parentAccount.accountName); @@ -90,7 +85,7 @@ for (const [i, token] of tokensReceive.entries()) { } for (const [i, token] of tokens.entries()) { - test.describe.parallel("Token visible in parent account", () => { + test.describe("Token visible in parent account", () => { test.use({ userdata: "speculos-subAccount", testName: `Token visible in parent account (${token.parentAccount.currency.uiName})`, @@ -99,12 +94,10 @@ for (const [i, token] of tokens.entries()) { }); test(`Token visible in parent account (${token.parentAccount.currency.uiName})`, async ({ - page, + app, }) => { addTmsLink(["B2CQA-1425"]); - const app = new Application(page); - await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName(token.parentAccount.accountName); await app.account.expectTokenToBePresent(token);