From fea5b354dfdcda35f9ff781a7c6d782df7b45871 Mon Sep 17 00:00:00 2001 From: Yaroslava Polishchuk Date: Tue, 17 Dec 2024 12:03:42 +0100 Subject: [PATCH] Reverting changes done for testing --- .../tests/fixtures/common.ts | 3 +- .../tests/playwright.config.ts | 2 +- .../tests/specs/speculos/send.tx.spec.ts | 104 +++++++++--------- 3 files changed, 56 insertions(+), 53 deletions(-) diff --git a/apps/ledger-live-desktop/tests/fixtures/common.ts b/apps/ledger-live-desktop/tests/fixtures/common.ts index 0afb7a098d44..46b7b69f1a63 100644 --- a/apps/ledger-live-desktop/tests/fixtures/common.ts +++ b/apps/ledger-live-desktop/tests/fixtures/common.ts @@ -206,9 +206,8 @@ export const test = base.extend({ //Remove video if test passed if (testInfo.status === "passed") { - await captureArtifacts(page, testInfo); await electronApp.close(); - //await page.video()?.delete(); + await page.video()?.delete(); } }, }); diff --git a/apps/ledger-live-desktop/tests/playwright.config.ts b/apps/ledger-live-desktop/tests/playwright.config.ts index 5696a246fc8c..f8afb6ef1be8 100644 --- a/apps/ledger-live-desktop/tests/playwright.config.ts +++ b/apps/ledger-live-desktop/tests/playwright.config.ts @@ -36,7 +36,7 @@ const config: PlaywrightTestConfig = { ignoreHTTPSErrors: true, screenshot: process.env.CI ? "only-on-failure" : "off", }, - //forbidOnly: !!process.env.CI, + forbidOnly: !!process.env.CI, preserveOutput: process.env.CI ? "failures-only" : "always", maxFailures: process.env.CI ? 5 : undefined, reportSlowTests: process.env.CI ? { max: 0, threshold: 60000 } : null, 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 adf276b19ce1..f8ddd9382cce 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 @@ -149,51 +149,51 @@ const transactionE2E = [ 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", - // bugTicket: "BACK-8150", - // }, - // { - // transaction: new Transaction(Account.DOGE_1, Account.DOGE_2, "0.01", Fee.SLOW), - // xrayTicket: "B2CQA-2573", - // }, - // { - // transaction: new Transaction(Account.BCH_1, Account.BCH_2, "0.0001", Fee.SLOW), - // xrayTicket: "B2CQA-2808", - // }, - // { - // transaction: new Transaction(Account.DOT_1, Account.DOT_2, "0.0001"), - // xrayTicket: "B2CQA-2809", - // }, - // { - // transaction: new Transaction(Account.ALGO_1, Account.ALGO_2, "0.001"), - // xrayTicket: "B2CQA-2810", - // }, - // { - // transaction: new Transaction(Account.SOL_1, Account.SOL_2, "0.000001", undefined, "noTag"), - // xrayTicket: "B2CQA-2811", - // }, - // { - // transaction: new Transaction(Account.TRX_1, Account.TRX_2, "0.01"), - // xrayTicket: "B2CQA-2812", - // }, - // { - // transaction: new Transaction(Account.XLM_1, Account.XLM_2, "0.0001", undefined, "noTag"), - // xrayTicket: "B2CQA-2813", - // }, - // { - // transaction: new Transaction(Account.ATOM_1, Account.ATOM_2, "0.0001", undefined, "noTag"), - // xrayTicket: "B2CQA-2814", - // }, - // { - // transaction: new Transaction(Account.ADA_1, Account.ADA_2, "1", undefined, "noTag"), - // xrayTicket: "B2CQA-2815", - // }, - // { - // transaction: new Transaction(Account.XRP_1, Account.XRP_2, "0.0001", undefined, "noTag"), - // xrayTicket: "B2CQA-2816", - // }, + { + transaction: new Transaction(Account.POL_1, Account.POL_2, "0.001", Fee.SLOW), + xrayTicket: "B2CQA-2807", + bugTicket: "BACK-8150", + }, + { + transaction: new Transaction(Account.DOGE_1, Account.DOGE_2, "0.01", Fee.SLOW), + xrayTicket: "B2CQA-2573", + }, + { + transaction: new Transaction(Account.BCH_1, Account.BCH_2, "0.0001", Fee.SLOW), + xrayTicket: "B2CQA-2808", + }, + { + transaction: new Transaction(Account.DOT_1, Account.DOT_2, "0.0001"), + xrayTicket: "B2CQA-2809", + }, + { + transaction: new Transaction(Account.ALGO_1, Account.ALGO_2, "0.001"), + xrayTicket: "B2CQA-2810", + }, + { + transaction: new Transaction(Account.SOL_1, Account.SOL_2, "0.000001", undefined, "noTag"), + xrayTicket: "B2CQA-2811", + }, + { + transaction: new Transaction(Account.TRX_1, Account.TRX_2, "0.01"), + xrayTicket: "B2CQA-2812", + }, + { + transaction: new Transaction(Account.XLM_1, Account.XLM_2, "0.0001", undefined, "noTag"), + xrayTicket: "B2CQA-2813", + }, + { + transaction: new Transaction(Account.ATOM_1, Account.ATOM_2, "0.0001", undefined, "noTag"), + xrayTicket: "B2CQA-2814", + }, + { + transaction: new Transaction(Account.ADA_1, Account.ADA_2, "1", undefined, "noTag"), + xrayTicket: "B2CQA-2815", + }, + { + transaction: new Transaction(Account.XRP_1, Account.XRP_2, "0.0001", undefined, "noTag"), + xrayTicket: "B2CQA-2816", + }, ]; const tokenTransactionInvalid = [ @@ -217,7 +217,11 @@ test.describe("Send flows", () => { //Warning 🚨: Test may fail due to the GetAppAndVersion issue - Jira: LIVE-12581 or insufficient funds for (const transaction of transactionE2E) { - test.describe.only("Send from 1 account to another", () => { + test.describe("Send from 1 account to another", () => { + test.beforeAll(async () => { + process.env.DISABLE_TRANSACTION_BROADCAST = "0"; + }); + test.use({ userdata: "skip-onboarding", speculosApp: transaction.transaction.accountToDebit.currency.speculosApp, @@ -246,14 +250,14 @@ test.describe("Send flows", () => { { annotation: [ { type: "TMS", description: transaction.xrayTicket }, - //{ type: "BUG", description: transaction.bugTicket }, + { type: "BUG", description: transaction.bugTicket }, ], }, async ({ app }) => { await addTmsLink(getDescription(test.info().annotations, "TMS").split(", ")); - // if (transaction.bugTicket) { - // await addBugLink(getDescription(test.info().annotations, "BUG").split(", ")); - // } + if (transaction.bugTicket) { + await addBugLink(getDescription(test.info().annotations, "BUG").split(", ")); + } await app.layout.goToAccounts(); await app.accounts.navigateToAccountByName(