-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8648 from LedgerHQ/support/qaa_309_detox_speculos…
…_verify_address [QAA-309][Detox][Speculos] Verify address test
- Loading branch information
Showing
27 changed files
with
230 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { expectValidAddressDevice } from "@ledgerhq/live-common/e2e/speculos"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
export default class SpeculosPage { | ||
@Step("Verify receive address correctness on device") | ||
async expectValidAddressDevice(account: Account, addressDisplayed: string) { | ||
await expectValidAddressDevice(account, addressDisplayed); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddress.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { CLI } from "../../../utils/cliUtils"; | ||
import { Application } from "../../../page"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
export async function runVerifyAddressTest(account: Account, tmsLink: string) { | ||
const app = new Application(); | ||
|
||
describe(`Verify Address - ${account.currency.name}`, () => { | ||
beforeAll(async () => { | ||
await app.init({ | ||
speculosApp: account.currency.speculosApp, | ||
cliCommands: [ | ||
() => { | ||
return CLI.liveData({ | ||
currency: account.currency.currencyId, | ||
index: account.index, | ||
appjson: app.userdataPath, | ||
add: true, | ||
}); | ||
}, | ||
], | ||
}); | ||
await app.portfolio.waitForPortfolioPageToLoad(); | ||
}); | ||
|
||
$TmsLink(tmsLink); | ||
it(`Verify address on ${account.currency.name}`, async () => { | ||
await app.accounts.openViaDeeplink(); | ||
await app.common.goToAccountByName(account.accountName); | ||
await app.account.tapReceive(); | ||
await app.receive.selectVerifyAddress(); | ||
const displayedAddress = await app.receive.getFreshAddressDisplayed(); | ||
await app.speculos.expectValidAddressDevice(account, displayedAddress); | ||
await app.receive.expectReceivePageIsDisplayed(account.currency.ticker, account.accountName); | ||
await app.receive.expectAddressIsCorrect(displayedAddress); | ||
}); | ||
|
||
afterAll(async () => { | ||
await app?.common.removeSpeculos(); | ||
}); | ||
}); | ||
} |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressATOM.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.ATOM_1, "B2CQA-2560, B2CQA-2694"); |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressBCH.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.BCH_1, "B2CQA-2558, B2CQA-2693"); |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressBSC.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.BSC_1, "B2CQA-2686, B2CQA-2696"); |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressBTC.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.BTC_NATIVE_SEGWIT_1, "B2CQA-2559, B2CQA-2687"); |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressDOT.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.DOT_1, "B2CQA-2562, B2CQA-2691"); |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressETH.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.ETH_1, "B2CQA-2561, B2CQA-2688"); |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressSOL.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.SOL_1, "B2CQA-2563, B2CQA-2689"); |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressTRX.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.TRX_1, "B2CQA-2565, B2CQA-2690"); |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressXRP.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.XRP_1, "B2CQA-2566, B2CQA-2692"); |
4 changes: 4 additions & 0 deletions
4
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyAddressXTZ.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { runVerifyAddressTest } from "./verifyAddress"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
runVerifyAddressTest(Account.XTZ_1, "B2CQA-2564, B2CQA-2695"); |
39 changes: 39 additions & 0 deletions
39
apps/ledger-live-mobile/e2e/specs/speculos/verifyAddress/verifyEmptyAddressTRX.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { CLI } from "../../../utils/cliUtils"; | ||
import { Application } from "../../../page"; | ||
import { Account } from "@ledgerhq/live-common/e2e/enum/Account"; | ||
|
||
const app = new Application(); | ||
const account = Account.TRX_3; | ||
|
||
describe(`Verify Address warnings - ${account.currency.name}`, () => { | ||
beforeAll(async () => { | ||
await app.init({ | ||
speculosApp: account.currency.speculosApp, | ||
cliCommands: [ | ||
() => { | ||
return CLI.liveData({ | ||
currency: account.currency.currencyId, | ||
index: account.index, | ||
appjson: app.userdataPath, | ||
add: true, | ||
}); | ||
}, | ||
], | ||
}); | ||
await app.portfolio.waitForPortfolioPageToLoad(); | ||
}); | ||
|
||
$TmsLink("B2CQA-1551"); | ||
it(`Verify address warning for ${account.currency.name}`, async () => { | ||
await app.accounts.openViaDeeplink(); | ||
await app.common.goToAccountByName(account.accountName); | ||
await app.account.tapReceive(); | ||
await app.receive.doNotVerifyAddress(); | ||
await app.receive.expectReceivePageIsDisplayed(account.currency.ticker, account.accountName); | ||
await app.receive.expectTronNewAddressWarning(); | ||
}); | ||
|
||
afterAll(async () => { | ||
await app?.common.removeSpeculos(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.