Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QAA-399][Speculos] Move LLM/LLD Speculos common code #8741

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { step } from "tests/misc/reporters/step";
import { Drawer } from "tests/component/drawer.component";
import { Currency } from "@ledgerhq/live-common/e2e/enum/Currency";
import { Delegate } from "tests/models/Delegate";
import { Delegate } from "@ledgerhq/live-common/e2e/models/Delegate";
import { expect } from "@playwright/test";
import { Transaction } from "tests/models/Transaction";
import { Transaction } from "@ledgerhq/live-common/e2e/models/Transaction";

export class DelegateDrawer extends Drawer {
private provider = (provider: string) =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { step } from "tests/misc/reporters/step";
import { Drawer } from "tests/component/drawer.component";
import { expect } from "@playwright/test";
import { NFTTransaction, Transaction } from "tests/models/Transaction";
import { NFTTransaction, Transaction } from "@ledgerhq/live-common/e2e/models/Transaction";

export class SendDrawer extends Drawer {
private addressValue = (address: string) =>
Expand Down
2 changes: 1 addition & 1 deletion apps/ledger-live-desktop/tests/page/modal/send.modal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from "@playwright/test";
import { Modal } from "../../component/modal.component";
import { step } from "tests/misc/reporters/step";
import { NFTTransaction, Transaction } from "../../models/Transaction";
import { NFTTransaction, Transaction } from "@ledgerhq/live-common/e2e/models/Transaction";

export class SendModal extends Modal {
private drowdownAccount = this.page.locator('[data-testid="modal-content"] svg').nth(1);
Expand Down
127 changes: 14 additions & 113 deletions apps/ledger-live-desktop/tests/page/speculos.page.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
import { AppPage } from "tests/page/abstractClasses";
import { step } from "tests/misc/reporters/step";
import {
pressBoth,
pressUntilTextFound,
containsSubstringInEvent,
activateLedgerSync,
expectValidAddressDevice,
signSendTransaction,
signSendNFTTransaction,
signDelegationTransaction,
verifyAmountsAndAcceptSwap,
verifyAmountsAndRejectSwap,
} from "@ledgerhq/live-common/e2e/speculos";
import { Account } from "@ledgerhq/live-common/e2e/enum/Account";
import { expect } from "@playwright/test";
import { NFTTransaction, Transaction } from "tests/models/Transaction";
import { Delegate } from "tests/models/Delegate";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import { Currency } from "@ledgerhq/live-common/e2e/enum/Currency";
import { Swap } from "tests/models/Swap";
import { extractNumberFromString } from "tests/utils/textParserUtils";
import { sendBTCBasedCoin } from "tests/families/bitcoin";
import { sendEVM, sendEvmNFT } from "tests/families/evm";
import { sendPolkadot } from "tests/families/polkadot";
import { sendAlgorand } from "tests/families/algorand";
import { sendTron } from "tests/families/tron";
import { sendStellar } from "tests/families/stellar";
import { sendCardano } from "tests/families/cardano";
import { sendXRP } from "tests/families/xrp";
import { delegateNear } from "tests/families/near";
import { delegateCosmos, sendCosmos } from "tests/families/cosmos";
import { delegateSolana, sendSolana } from "tests/families/solana";
import { NFTTransaction, Transaction } from "@ledgerhq/live-common/e2e/models/Transaction";
import { Delegate } from "@ledgerhq/live-common/e2e/models/Delegate";

import { Swap } from "@ledgerhq/live-common/e2e/models/Swap";
export class SpeculosPage extends AppPage {
@step("Verify receive address correctness on device")
async expectValidAddressDevice(account: Account, addressDisplayed: string) {
Expand All @@ -39,113 +27,26 @@ export class SpeculosPage extends AppPage {

@step("Sign Send NFT Transaction")
async signSendNFTTransaction(tx: NFTTransaction) {
const currencyName = tx.accountToDebit.currency;
switch (currencyName) {
case Currency.ETH:
await sendEvmNFT(tx);
break;
default:
throw new Error(`Unsupported currency: ${currencyName}`);
}
await signSendNFTTransaction(tx);
}

@step("Sign Send Transaction")
async signSendTransaction(tx: Transaction) {
const currencyName = tx.accountToDebit.currency;
switch (currencyName) {
case Currency.sepETH:
case Currency.POL:
await sendEVM(tx);
break;
case Currency.DOGE:
case Currency.BCH:
await sendBTCBasedCoin(tx);
break;
case Currency.DOT:
await sendPolkadot(tx);
break;
case Currency.ALGO:
await sendAlgorand(tx);
break;
case Currency.SOL:
await sendSolana(tx);
break;
case Currency.TRX:
await sendTron(tx);
break;
case Currency.XLM:
await sendStellar(tx);
break;
case Currency.ATOM:
await sendCosmos(tx);
break;
case Currency.ADA:
await sendCardano(tx);
break;
case Currency.XRP:
await sendXRP(tx);
break;
default:
throw new Error(`Unsupported currency: ${currencyName}`);
}
await signSendTransaction(tx);
}

@step("Sign Delegation Transaction")
async signDelegationTransaction(delegatingAccount: Delegate) {
const currencyName = delegatingAccount.account.currency.name;
switch (currencyName) {
case Account.SOL_1.currency.name:
await delegateSolana();
break;
case Account.NEAR_1.currency.name:
await delegateNear(delegatingAccount);
break;
case Account.ATOM_1.currency.name:
await delegateCosmos(delegatingAccount);
break;
default:
throw new Error(`Unsupported currency: ${currencyName}`);
}
await signDelegationTransaction(delegatingAccount);
}

@step("Verify amounts and accept swap")
async verifyAmountsAndAcceptSwap(swap: Swap) {
const events = await pressUntilTextFound(DeviceLabels.ACCEPT);
await this.verifySwapData(swap, events);
await pressBoth();
await verifyAmountsAndAcceptSwap(swap);
}

@step("Verify amounts and reject swap")
async verifyAmountsAndRejectSwap(swap: Swap) {
const events = await pressUntilTextFound(DeviceLabels.REJECT);
await this.verifySwapData(swap, events);
await pressBoth();
}

async verifySwapData(swap: Swap, events: string[]) {
const sendAmountScreen = containsSubstringInEvent(swap.amount, events);
expect(sendAmountScreen).toBeTruthy();
this.verifySwapGetAmountScreen(swap, events);
this.verifySwapFeesAmountScreen(swap, events);
}

verifySwapGetAmountScreen(swap: Swap, events: string[]) {
const parsedAmountToReceive = extractNumberFromString(swap.amountToReceive);
swap.amountToReceive =
parsedAmountToReceive.length < 19
? parsedAmountToReceive
: parsedAmountToReceive.substring(0, 18);

const receivedGetAmount = containsSubstringInEvent(`${swap.amountToReceive}`, events);
expect(receivedGetAmount).toBeTruthy();
}

verifySwapFeesAmountScreen(swap: Swap, events: string[]) {
const parsedFeesAmount = extractNumberFromString(swap.feesAmount);
swap.feesAmount =
parsedFeesAmount.length < 19 ? parsedFeesAmount : parsedFeesAmount.substring(0, 18);

const receivedFeesAmount = containsSubstringInEvent(swap.feesAmount, events);
expect(receivedFeesAmount).toBeTruthy();
await verifyAmountsAndRejectSwap(swap);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test } from "../../fixtures/common";
import { Account } from "@ledgerhq/live-common/e2e/enum/Account";
import { Delegate } from "../../models/Delegate";
import { Delegate } from "@ledgerhq/live-common/e2e/models/Delegate";
import { addTmsLink, addBugLink } from "tests/utils/allureUtils";
import { getDescription } from "../../utils/customJsonReporter";
import { CLI } from "tests/utils/cliUtils";
Expand Down Expand Up @@ -141,7 +141,7 @@
await app.layout.goToAccounts();
await app.accounts.navigateToAccountByName(validator.delegate.account.accountName);

await app.account.startStakingFlowFromMainStakeButton();

Check failure on line 144 in apps/ledger-live-desktop/tests/specs/speculos/delegate.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (1, 3)

[speculos_tests] β€Ί specs/speculos/delegate.spec.ts:133:11 β€Ί Delegate flows β€Ί Select a validator β€Ί [Cardano] - Select validator

1) [speculos_tests] β€Ί specs/speculos/delegate.spec.ts:133:11 β€Ί Delegate flows β€Ί Select a validator β€Ί [Cardano] - Select validator Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.click: Timeout 120000ms exceeded. Call log: - waiting for getByTestId('stake-button') 142 | await app.accounts.navigateToAccountByName(validator.delegate.account.accountName); 143 | > 144 | await app.account.startStakingFlowFromMainStakeButton(); | ^ 145 | await app.modal.continue(); 146 | 147 | await app.delegate.verifyFirstProviderName(validator.delegate.provider); at /home/runner/_work/ledger-live/ledger-live/apps/ledger-live-desktop/tests/specs/speculos/delegate.spec.ts:144:29
await app.modal.continue();

await app.delegate.verifyFirstProviderName(validator.delegate.provider);
Expand All @@ -149,7 +149,7 @@
await app.delegate.verifyContinueDisabled();
await app.delegate.selectProviderByName(validator.delegate.provider);
await app.delegate.verifyProviderTC(validator.delegate.provider);
} else await app.delegate.verifyContinueEnabled();

Check failure on line 152 in apps/ledger-live-desktop/tests/specs/speculos/delegate.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (1, 3)

[speculos_tests] β€Ί specs/speculos/delegate.spec.ts:133:11 β€Ί Delegate flows β€Ί Select a validator β€Ί [Cardano] - Select validator

1) [speculos_tests] β€Ί specs/speculos/delegate.spec.ts:133:11 β€Ί Delegate flows β€Ί Select a validator β€Ί [Cardano] - Select validator Error: Timed out 41000ms waiting for expect(locator).toBeEnabled() Locator: getByText('Continue') Expected: enabled Received: disabled Call log: - expect.toBeEnabled with timeout 41000ms - waiting for getByText('Continue') - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc

Check failure on line 152 in apps/ledger-live-desktop/tests/specs/speculos/delegate.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (1, 3)

[speculos_tests] β€Ί specs/speculos/delegate.spec.ts:133:11 β€Ί Delegate flows β€Ί Select a validator β€Ί [Cardano] - Select validator

1) [speculos_tests] β€Ί specs/speculos/delegate.spec.ts:133:11 β€Ί Delegate flows β€Ί Select a validator β€Ί [Cardano] - Select validator Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: Timed out 41000ms waiting for expect(locator).toBeEnabled() Locator: getByText('Continue') Expected: enabled Received: disabled Call log: - expect.toBeEnabled with timeout 41000ms - waiting for getByText('Continue') - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG JgZu">Continue</div> - unexpected value "disabled" - locator resolved to <div class="sc-eoVZPG J
await app.delegate.verifyProvider(1);
await app.delegate.openSearchProviderModal();
await app.delegate.checkValidatorListIsVisible();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { test } from "../../fixtures/common";

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/nft.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (1, 3)

[speculos_tests] β€Ί specs/speculos/nft.spec.ts:88:7 β€Ί The user can see his NFT floor price β€Ί User can see his NFT floor price

6) [speculos_tests] β€Ί specs/speculos/nft.spec.ts:88:7 β€Ί The user can see his NFT floor price β€Ί User can see his NFT floor price Test timeout of 400000ms exceeded while setting up "electronApp".
import { NFTTransaction } from "../../models/Transaction";
import { NFTTransaction } from "@ledgerhq/live-common/e2e/models/Transaction";
import { Account } from "@ledgerhq/live-common/e2e/enum/Account";
import { Nft } from "@ledgerhq/live-common/e2e/enum/Nft";
import { Fee } from "@ledgerhq/live-common/e2e/enum/Fee";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { test } from "../../fixtures/common";

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (2, 3)

[speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:356:11 β€Ί Send flows β€Ί Send token (subAccount) - invalid amount input β€Ί Send from Ethereum 2 to Ethereum 1 - invalid amount input

1) [speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:356:11 β€Ί Send flows β€Ί Send token (subAccount) - invalid amount input β€Ί Send from Ethereum 2 to Ethereum 1 - invalid amount input Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (2, 3)

[speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:449:11 β€Ί Send flows β€Ί Check invalid amount input error β€Ί Check "Recipient address is inactive. Send at least 1 XRP to activate it" for XRP - invalid amount 0.1 input error

2) [speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:449:11 β€Ί Send flows β€Ί Check invalid amount input error β€Ί Check "Recipient address is inactive. Send at least 1 XRP to activate it" for XRP - invalid amount 0.1 input error Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (2, 3)

[speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:538:11 β€Ί Send flows β€Ί Send funds step 1 (Recipient) - positive cases (Button enabled) β€Ί Check button enabled (0.00001 from Cosmos 1 to Cosmos 2) - valid address input (cosmos18sdl4lvyjtvpjkkt5smglux9sf4phdcpaddfae)

5) [speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:538:11 β€Ί Send flows β€Ί Send funds step 1 (Recipient) - positive cases (Button enabled) β€Ί Check button enabled (0.00001 from Cosmos 1 to Cosmos 2) - valid address input (cosmos18sdl4lvyjtvpjkkt5smglux9sf4phdcpaddfae) Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (2, 3)

[speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:538:11 β€Ί Send flows β€Ί Send funds step 1 (Recipient) - positive cases (Button enabled) β€Ί Check button enabled (0.0001 from Cosmos 1 to Cosmos 2) - valid address input (cosmos18sdl4lvyjtvpjkkt5smglux9sf4phdcpaddfae)

6) [speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:538:11 β€Ί Send flows β€Ί Send funds step 1 (Recipient) - positive cases (Button enabled) β€Ί Check button enabled (0.0001 from Cosmos 1 to Cosmos 2) - valid address input (cosmos18sdl4lvyjtvpjkkt5smglux9sf4phdcpaddfae) Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (2, 3)

[speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:580:11 β€Ί Send flows β€Ί Send funds step 1 (Recipient) - negative cases (Button disabled) β€Ί Check "Recipient address is the same as the sender address" (from Polkadot 1 to Polkadot 1) - invalid address input error

7) [speculos_tests] β€Ί specs/speculos/send.tx.spec.ts:580:11 β€Ί Send flows β€Ί Send funds step 1 (Recipient) - negative cases (Button disabled) β€Ί Check "Recipient address is the same as the sender address" (from Polkadot 1 to Polkadot 1) - invalid address input error Test timeout of 400000ms exceeded while setting up "electronApp".
import { Account } from "@ledgerhq/live-common/e2e/enum/Account";
import { Fee } from "@ledgerhq/live-common/e2e/enum/Fee";
import { OperationType } from "@ledgerhq/live-common/e2e/enum/OperationType";
import { Transaction } from "../../models/Transaction";
import { Transaction } from "@ledgerhq/live-common/e2e/models/Transaction";
import { addTmsLink, addBugLink } from "tests/utils/allureUtils";
import { getDescription } from "../../utils/customJsonReporter";
import { CLI } from "tests/utils/cliUtils";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import test from "../../fixtures/common";

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Ethereum to Solana

1) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Ethereum to Solana Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Ethereum to Solana

1) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Ethereum to Solana Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Ethereum to Solana

1) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Ethereum to Solana Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Bitcoin to Solana

2) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Bitcoin to Solana Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Bitcoin to Solana

2) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Bitcoin to Solana Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Bitcoin to Solana

2) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Bitcoin to Solana Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Tether USD to Solana

3) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Tether USD to Solana Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Tether USD to Solana

3) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Tether USD to Solana Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Tether USD to Solana

3) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Tether USD to Solana Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Test timeout of 400000ms exceeded while setting up "electronApp".

Check failure on line 1 in apps/ledger-live-desktop/tests/specs/speculos/swap.spec.ts

View workflow job for this annotation

GitHub Actions / Desktop Tests E2E (Ubuntu) (3, 3)

[speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Solana to Ethereum

4) [speculos_tests] β€Ί specs/speculos/swap.spec.ts:220:9 β€Ί Swap - Accepted (without tx broadcast) β€Ί Swap Solana to Ethereum Test timeout of 400000ms exceeded while setting up "electronApp".
import { Account } from "@ledgerhq/live-common/e2e/enum/Account";
import { AppInfos } from "@ledgerhq/live-common/e2e/enum/AppInfos";
import { setExchangeDependencies } from "@ledgerhq/live-common/e2e/speculos";
import { Fee } from "@ledgerhq/live-common/e2e/enum/Fee";
import { Swap } from "tests/models/Swap";
import { Swap } from "@ledgerhq/live-common/e2e/models/Swap";
import { Provider, Rate } from "@ledgerhq/live-common/e2e/enum/Swap";
import { addTmsLink } from "tests/utils/allureUtils";
import { getDescription } from "tests/utils/customJsonReporter";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { expect } from "@playwright/test";
import { Transaction } from "tests/models/Transaction";
import {
pressBoth,
pressUntilTextFound,
containsSubstringInEvent,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import expect from "expect";
import { Transaction } from "../models/Transaction";
import { pressBoth, pressUntilTextFound, containsSubstringInEvent } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";

export async function sendAlgorand(tx: Transaction) {
const events = await pressUntilTextFound(DeviceLabels.CAPS_APPROVE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { expect } from "@playwright/test";
import { Transaction } from "tests/models/Transaction";
import {
pressBoth,
pressUntilTextFound,
waitFor,
containsSubstringInEvent,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import expect from "expect";
import { Transaction } from "../models/Transaction";
import { pressBoth, pressUntilTextFound, waitFor, containsSubstringInEvent } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";

export async function sendBTCBasedCoin(tx: Transaction) {
const events = await pressUntilTextFound(DeviceLabels.ACCEPT);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { expect } from "@playwright/test";
import { Transaction } from "tests/models/Transaction";
import {
pressBoth,
pressUntilTextFound,
containsSubstringInEvent,
waitFor,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import expect from "expect";
import { Transaction } from "../models/Transaction";
import { pressBoth, pressUntilTextFound, containsSubstringInEvent, waitFor } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";

export async function sendCardano(tx: Transaction) {
await waitFor(DeviceLabels.NEW_ORDINARY_TRANSACTION);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { expect } from "@playwright/test";
import { Delegate } from "tests/models/Delegate";
import { Transaction } from "tests/models/Transaction";
import {
pressBoth,
pressUntilTextFound,
waitFor,
containsSubstringInEvent,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import expect from "expect";
import { Delegate } from "../models/Delegate";
import { Transaction } from "../models/Transaction";
import { pressBoth, pressUntilTextFound, waitFor, containsSubstringInEvent } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";

export async function delegateCosmos(delegatingAccount: Delegate) {
await waitFor(DeviceLabels.PLEASE_REVIEW);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { expect } from "@playwright/test";
import { NFTTransaction, Transaction } from "tests/models/Transaction";
import {
pressBoth,
pressUntilTextFound,
containsSubstringInEvent,
waitFor,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import expect from "expect";
import { NFTTransaction, Transaction } from "../models/Transaction";
import { pressBoth, pressUntilTextFound, containsSubstringInEvent, waitFor } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";

export async function sendEVM(tx: Transaction) {
const events = await pressUntilTextFound(DeviceLabels.ACCEPT);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { expect } from "@playwright/test";
import { Delegate } from "tests/models/Delegate";
import {
pressBoth,
pressUntilTextFound,
waitFor,
containsSubstringInEvent,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import expect from "expect";
import { Delegate } from "../models/Delegate";
import { pressBoth, pressUntilTextFound, waitFor, containsSubstringInEvent } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";

export async function delegateNear(delegatingAccount: Delegate) {
await waitFor(DeviceLabels.VIEW_HEADER);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { expect } from "@playwright/test";
import { Transaction } from "tests/models/Transaction";
import {
pressBoth,
pressUntilTextFound,
containsSubstringInEvent,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import expect from "expect";
import { Transaction } from "../models/Transaction";
import { pressBoth, pressUntilTextFound, containsSubstringInEvent } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";

export async function sendPolkadot(tx: Transaction) {
const events = await pressUntilTextFound(DeviceLabels.CAPS_APPROVE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { expect } from "@playwright/test";
import {
pressBoth,
pressUntilTextFound,
waitFor,
containsSubstringInEvent,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import { Transaction } from "tests/models/Transaction";
import expect from "expect";
import { pressBoth, pressUntilTextFound, waitFor, containsSubstringInEvent } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";
import { Transaction } from "../models/Transaction";

export async function delegateSolana() {
await waitFor(DeviceLabels.DELEGATE_FROM);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { expect } from "@playwright/test";
import { Transaction } from "tests/models/Transaction";
import {
pressBoth,
pressUntilTextFound,
containsSubstringInEvent,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import expect from "expect";
import { Transaction } from "../models/Transaction";
import { pressBoth, pressUntilTextFound, containsSubstringInEvent } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";

export async function sendStellar(tx: Transaction) {
const events = await pressUntilTextFound(DeviceLabels.SIGN);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { expect } from "@playwright/test";
import { Transaction } from "tests/models/Transaction";
import {
pressBoth,
pressUntilTextFound,
containsSubstringInEvent,
} from "@ledgerhq/live-common/e2e/speculos";
import { DeviceLabels } from "@ledgerhq/live-common/e2e/enum/DeviceLabels";
import expect from "expect";
import { Transaction } from "../models/Transaction";
import { pressBoth, pressUntilTextFound, containsSubstringInEvent } from "../speculos";
import { DeviceLabels } from "../enum/DeviceLabels";

export async function sendTron(tx: Transaction) {
const events = await pressUntilTextFound(DeviceLabels.SIGN);
Expand Down
Loading
Loading