From 14c47f6a059123b0710f6d8c974df08bc7eefc65 Mon Sep 17 00:00:00 2001 From: Olivier Freyssinet Date: Tue, 10 Sep 2024 09:03:15 +0200 Subject: [PATCH] fix(llm/e2e): onboarding scroll to device --- apps/ledger-live-mobile/e2e/page/common.page.ts | 2 ++ .../e2e/page/onboarding/onboardingSteps.page.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/ledger-live-mobile/e2e/page/common.page.ts b/apps/ledger-live-mobile/e2e/page/common.page.ts index fd6cba0c10b3..1d28e536fe5c 100644 --- a/apps/ledger-live-mobile/e2e/page/common.page.ts +++ b/apps/ledger-live-mobile/e2e/page/common.page.ts @@ -1,6 +1,7 @@ import { DeviceUSB, ModelId, getUSBDevice, knownDevices } from "../models/devices"; import { getElementById, + scrollToId, tapByElement, tapById, typeTextByElement, @@ -63,6 +64,7 @@ export default class CommonPage { async addDeviceViaUSB(device: ModelId) { const nano = getUSBDevice(device); await bridge.addDevicesUSB(nano); + await scrollToId(this.pluggedDeviceRow(nano)); await waitForElementById(this.pluggedDeviceRow(nano)); await tapById(this.pluggedDeviceRow(nano)); await new DeviceAction(nano).accessManager(); diff --git a/apps/ledger-live-mobile/e2e/page/onboarding/onboardingSteps.page.ts b/apps/ledger-live-mobile/e2e/page/onboarding/onboardingSteps.page.ts index f8352cbef49e..0409645118f2 100644 --- a/apps/ledger-live-mobile/e2e/page/onboarding/onboardingSteps.page.ts +++ b/apps/ledger-live-mobile/e2e/page/onboarding/onboardingSteps.page.ts @@ -1,4 +1,10 @@ -import { tapByElement, getElementById, waitForElementById, tapById } from "../../helpers"; +import { + tapByElement, + getElementById, + waitForElementById, + tapById, + scrollToId, +} from "../../helpers"; import { ModelId } from "../../models/devices"; import { expect } from "detox"; @@ -104,6 +110,7 @@ export default class OnboardingStepsPage { } async chooseDevice(device: ModelId) { + await scrollToId(this.selectDevice(device)); await tapById(this.selectDevice(device)); }