diff --git a/apps/ledger-live-desktop/tests/specs/speculos/delegate.spec.ts b/apps/ledger-live-desktop/tests/specs/speculos/delegate.spec.ts index dedd44581489..156d9db6cee8 100644 --- a/apps/ledger-live-desktop/tests/specs/speculos/delegate.spec.ts +++ b/apps/ledger-live-desktop/tests/specs/speculos/delegate.spec.ts @@ -28,7 +28,7 @@ const validators = [ xrayTicket: "B2CQA-2731, B2CQA-2763", }, { - delegate: new Delegate(Account.SOL_2, "0.001", "Ledger by Chorus One"), + delegate: new Delegate(Account.SOL_2, "0.001", "Ledger by Chorus One"), //Issue with the provider - CI ✅ because failling code is commented - LIVE-14500 xrayTicket: "B2CQA-2730, B2CQA-2764", }, { @@ -36,7 +36,7 @@ const validators = [ xrayTicket: "B2CQA-2732, B2CQA-2765", }, { - delegate: new Delegate(Account.ADA_1, "0.01", "LBF3 - Ledger by Figment 3"), + delegate: new Delegate(Account.ADA_1, "0.01", "LBF3 - Ledger by Figment 3"), //Issue with the provider - CI ✅ because failling code is commented - LIVE-14500 xrayTicket: "B2CQA-2766", }, { @@ -74,13 +74,11 @@ test.describe("Delegate flows", () => { test( `[${account.delegate.account.currency.name}] Delegate`, { - annotation: { - type: "TMS", - description: account.xrayTicket, - }, + annotation: { type: "TMS", description: account.xrayTicket }, }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName(account.delegate.account.accountName); @@ -133,13 +131,11 @@ test.describe("Delegate flows", () => { test( `[${validator.delegate.account.currency.name}] - Select validator`, { - annotation: { - type: "TMS", - description: validator.xrayTicket, - }, + annotation: { type: "TMS", description: validator.xrayTicket }, }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName(validator.delegate.account.accountName); @@ -195,6 +191,7 @@ test.describe("Delegate flows", () => { }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToPortfolio(); await app.portfolio.startStakeFlow(); @@ -216,6 +213,7 @@ test.describe("Delegate flows", () => { }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToMarket(); await app.market.search(delegateAccount.account.currency.name); await app.market.stakeButtonClick(delegateAccount.account.currency.ticker); diff --git a/apps/ledger-live-desktop/tests/specs/speculos/portfolio.spec.ts b/apps/ledger-live-desktop/tests/specs/speculos/portfolio.spec.ts index 58f4fde7c2b2..d5d27c862fdb 100644 --- a/apps/ledger-live-desktop/tests/specs/speculos/portfolio.spec.ts +++ b/apps/ledger-live-desktop/tests/specs/speculos/portfolio.spec.ts @@ -1,4 +1,6 @@ import { test } from "../../fixtures/common"; +import { addTmsLink } from "tests/utils/allureUtils"; +import { getDescription } from "../../utils/customJsonReporter"; test.describe("Portfolio", () => { test.use({ @@ -13,6 +15,8 @@ test.describe("Portfolio", () => { }, }, async ({ app }) => { + await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToPortfolio(); await app.portfolio.checkBuySellButtonVisibility(); await app.portfolio.checkStakeButtonVisibility(); diff --git a/apps/ledger-live-desktop/tests/specs/speculos/receive.address.spec.ts b/apps/ledger-live-desktop/tests/specs/speculos/receive.address.spec.ts index 8b901f7b1626..c19f5aa0de29 100644 --- a/apps/ledger-live-desktop/tests/specs/speculos/receive.address.spec.ts +++ b/apps/ledger-live-desktop/tests/specs/speculos/receive.address.spec.ts @@ -40,7 +40,7 @@ for (const account of accounts) { { annotation: { type: "TMS", - description: "B2CQA-249, B2CQA-651, B2CQA-652", + description: account.xrayTicket, }, }, async ({ app }) => { diff --git a/apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts b/apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts index 391f2e5e9061..e9513e22a627 100644 --- a/apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts +++ b/apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts @@ -2,7 +2,7 @@ import { test } from "../../fixtures/common"; import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; import { Fee } from "@ledgerhq/live-common/e2e/enum/Fee"; import { Transaction } from "../../models/Transaction"; -import { addTmsLink } from "tests/utils/allureUtils"; +import { addTmsLink, addBugLink } from "tests/utils/allureUtils"; import { getDescription } from "../../utils/customJsonReporter"; import { CLI } from "tests/utils/cliUtils"; import { isRunningInScheduledWorkflow } from "tests/utils/githubUtils"; @@ -24,6 +24,7 @@ const transactionsAmountInvalid = [ transaction: new Transaction(Account.XRP_1, Account.XRP_3, "1", undefined, "noTag"), expectedErrorMessage: "Recipient address is inactive. Send at least 10 XRP to activate it", xrayTicket: "B2CQA-2571", + bugTicket: "BACK-8110", }, { transaction: new Transaction(Account.DOT_1, Account.DOT_2, "1.2"), @@ -144,10 +145,10 @@ const transactionAddressValid = [ ]; const transactionE2E = [ - /*{ - transaction: new Transaction(Account.sep_ETH_1, Account.sep_ETH_2, "0.00001", Fee.SLOW), //todo: Reactivate when BE issue is fixed - LIVE-14844 + { + transaction: new Transaction(Account.sep_ETH_1, Account.sep_ETH_2, "0.00001", Fee.SLOW), xrayTicket: "B2CQA-2574", - },*/ + }, { transaction: new Transaction(Account.POL_1, Account.POL_2, "0.001", Fee.SLOW), xrayTicket: "B2CQA-2807", @@ -246,10 +247,7 @@ test.describe("Send flows", () => { test( `Send from ${transaction.transaction.accountToDebit.accountName} to ${transaction.transaction.accountToCredit.accountName}`, { - annotation: { - type: "TMS", - description: transaction.xrayTicket, - }, + annotation: { type: "TMS", description: transaction.xrayTicket }, }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); @@ -317,6 +315,8 @@ test.describe("Send flows", () => { }, }, async ({ app }) => { + await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName( tokenTransactionInvalid.transaction.accountToDebit.accountName, @@ -357,6 +357,8 @@ test.describe("Send flows", () => { }, }, async ({ app }) => { + await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName( transaction.transaction.accountToDebit.accountName, @@ -404,6 +406,8 @@ test.describe("Send flows", () => { }, }, async ({ app }) => { + await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName( tokenTransactionValid.accountToDebit.accountName, @@ -440,12 +444,17 @@ test.describe("Send flows", () => { test( `Check "${transaction.expectedErrorMessage}" for ${transaction.transaction.accountToDebit.currency.name} - invalid amount ${transaction.transaction.amount} input error`, { - annotation: { - type: "TMS", - description: transaction.xrayTicket, - }, + annotation: [ + { type: "TMS", description: transaction.xrayTicket }, + { type: "BUG", description: transaction.bugTicket }, + ], }, async ({ app }) => { + await addTmsLink(getDescription(test.info().annotations).split(", ")); + if (transaction.bugTicket) { + await addBugLink(getDescription(test.info().annotations).split(", ")); + } + await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName( transaction.transaction.accountToDebit.accountName, @@ -493,6 +502,7 @@ test.describe("Send flows", () => { }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName( transactionInputValid.accountToDebit.accountName, @@ -536,6 +546,7 @@ test.describe("Send flows", () => { }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName( transaction.transaction.accountToDebit.accountName, @@ -577,6 +588,7 @@ test.describe("Send flows", () => { }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName( transaction.transaction.accountToDebit.accountName, diff --git a/apps/ledger-live-desktop/tests/specs/speculos/settings.spec.ts b/apps/ledger-live-desktop/tests/specs/speculos/settings.spec.ts index 66462e21a8ac..80cfe136bc8d 100644 --- a/apps/ledger-live-desktop/tests/specs/speculos/settings.spec.ts +++ b/apps/ledger-live-desktop/tests/specs/speculos/settings.spec.ts @@ -12,13 +12,11 @@ test.describe("Settings", () => { test( `ERC20 token with 0 balance is hidden if 'hide empty token accounts' is ON`, { - annotation: { - type: "TMS", - description: "B2CQA-817", - }, + annotation: [{ type: "TMS", description: "B2CQA-817" }], }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); await app.accounts.showParentAccountTokens(Account.ETH_1.accountName); await app.accounts.verifyTokenVisibility( @@ -65,6 +63,7 @@ test.describe("Password", () => { }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToAccounts(); const countBeforeLock = await app.accounts.countAccounts(); await app.layout.goToSettings(); @@ -110,6 +109,7 @@ test.describe("counter value selection", () => { }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await app.layout.goToSettings(); await app.settings.changeCounterValue("euro"); await app.settings.expectCounterValue("Euro - EUR"); diff --git a/apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts b/apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts index fd8e9e00b2b7..197c4d5c34c9 100644 --- a/apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts +++ b/apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts @@ -222,6 +222,7 @@ for (const { swap, xrayTicket } of swaps) { }, async ({ app, electronApp }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await performSwapUntilQuoteSelectionStep(app, electronApp, swap); await app.swap.selectQuote(electronApp, swap.provider.name, swap.rate); await performSwapUntilDeviceVerificationStep(app, electronApp, swap); @@ -285,6 +286,7 @@ for (const { swap, xrayTicket } of rejectedSwaps) { }, async ({ app, electronApp }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await performSwapUntilQuoteSelectionStep(app, electronApp, swap); await app.swap.selectQuote(electronApp, swap.provider.name, swap.rate); await performSwapUntilDeviceVerificationStep(app, electronApp, swap); @@ -375,6 +377,7 @@ for (const { swap, xrayTicket } of tooLowAmountForQuoteSwaps) { }, async ({ app, electronApp }) => { await addTmsLink(getDescription(test.info().annotations).split(", ")); + await performSwapUntilQuoteSelectionStep(app, electronApp, swap); const errorMessage = swap.accountToDebit.accountType ? "Not enough balance." diff --git a/apps/ledger-live-desktop/tests/utils/allureUtils.ts b/apps/ledger-live-desktop/tests/utils/allureUtils.ts index 9efe66919c44..9cb91d25cc05 100644 --- a/apps/ledger-live-desktop/tests/utils/allureUtils.ts +++ b/apps/ledger-live-desktop/tests/utils/allureUtils.ts @@ -13,6 +13,12 @@ export async function addTmsLink(ids: string[]) { } } +export async function addBugLink(ids: string[]) { + for (const id of ids) { + await allure.issue(id, `https://ledgerhq.atlassian.net/browse/${id}`); + } +} + export async function captureArtifacts(page: Page, testInfo: TestInfo) { const screenshot = await page.screenshot(); await testInfo.attach("Screenshot", { body: screenshot, contentType: "image/png" }); diff --git a/apps/ledger-live-desktop/tests/utils/customJsonReporter.ts b/apps/ledger-live-desktop/tests/utils/customJsonReporter.ts index 16f6c9a85a05..d54c565c7c6e 100644 --- a/apps/ledger-live-desktop/tests/utils/customJsonReporter.ts +++ b/apps/ledger-live-desktop/tests/utils/customJsonReporter.ts @@ -3,7 +3,7 @@ import * as fs from "fs"; import * as path from "path"; export function getDescription(annotations: any) { - const annotation = annotations.find((ann: any) => ann.type === "TMS"); + const annotation = annotations.find((ann: any) => ann.type === "TMS" || ann.type === "BUG"); return annotation ? annotation.description : "Type not found"; }