Skip to content

Commit

Permalink
Merge pull request #8488 from LedgerHQ/support/fixing-counterValues-f…
Browse files Browse the repository at this point in the history
…or-e2e-testing

[QAA] fixing CounterValues (speculos e2e) + fixing send e2e test (new modal) - XRP
  • Loading branch information
VicAlbr authored Nov 26, 2024
2 parents f404cb1 + 2b583d0 commit 2a839c6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion apps/ledger-live-desktop/tests/fixtures/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const test = base.extend<TestFixtures>({
...process.env,
VERBOSE: true,
MOCK: IS_NOT_MOCK ? undefined : true,
MOCK_COUNTERVALUES: true,
MOCK_COUNTERVALUES: IS_NOT_MOCK ? undefined : true,
HIDE_DEBUG_MOCK: true,
CI: process.env.CI || undefined,
PLAYWRIGHT_RUN: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class AddAccountModal extends Modal {
private selectAccountInList = (Currency: Currency) =>
this.page.getByRole("option", {
name: `${Currency.name} (${Currency.ticker})`,
exact: true,
});
private selectTokenNetwork = (SubAccount: Account) =>
this.page
Expand Down
2 changes: 0 additions & 2 deletions apps/ledger-live-desktop/tests/page/modal/send.modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ export class SendModal extends Modal {
if (tx.speed !== undefined) {
await this.chooseFeeStrategy(tx.speed);
}

await this.countinueSendAmount();
}

@step("Verify tx information before confirming")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ for (const currency of currencies) {

await app.addAccount.addAccounts();
await app.addAccount.done();
// Todo: Remove 'if' when CounterValue is fixed for $TON - LIVE-13685
if (currency.currency.name !== Currency.TON.name) {
await app.layout.expectBalanceVisibility();
}
await app.layout.expectBalanceVisibility();
await app.portfolio.checkOperationHistory();
await app.layout.goToAccounts();
await app.accounts.navigateToAccountByName(firstAccountName);
Expand Down
9 changes: 4 additions & 5 deletions apps/ledger-live-desktop/tests/specs/speculos/send.tx.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const transactionsAmountInvalid = [
xrayTicket: "B2CQA-2569",
},
{
transaction: new Transaction(Account.XRP_1, Account.XRP_3, "1"),
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",
},
Expand Down Expand Up @@ -263,6 +263,7 @@ test.describe("Send flows", () => {

await app.account.clickSend();
await app.send.craftTx(transaction.transaction);
await app.send.countinueSendAmount();
await app.send.expectTxInfoValidity(transaction.transaction);
await app.send.clickContinueToDevice();

Expand Down Expand Up @@ -455,11 +456,9 @@ test.describe("Send flows", () => {
await app.accounts.navigateToAccountByName(
transaction.transaction.accountToDebit.accountName,
);

await app.account.clickSend();
await app.send.fillRecipient(transaction.transaction.accountToCredit.address);
await app.send.clickContinue();
await app.send.fillAmount(transaction.transaction.amount);

await app.send.craftTx(transaction.transaction);
await app.send.checkContinueButtonDisabled();
await app.layout.checkErrorMessage(transaction.expectedErrorMessage);
},
Expand Down

0 comments on commit 2a839c6

Please sign in to comment.