diff --git a/e2e/e2e-bridge-setup.js b/e2e/e2e-bridge-setup.js index 7cf1b2c63e..d91cd0b371 100644 --- a/e2e/e2e-bridge-setup.js +++ b/e2e/e2e-bridge-setup.js @@ -2,6 +2,5 @@ import Config from "react-native-config"; if (Config.MOCK) { - console.log("SETTING UP TEST CLIENT"); import("./bridge/client").then(({ init }) => init()); } diff --git a/e2e/global-setup.js b/e2e/global-setup.js index 014438c31b..5b0f1ca4a1 100644 --- a/e2e/global-setup.js +++ b/e2e/global-setup.js @@ -1,7 +1,6 @@ const detox = require("detox"); async function globalSetup() { - console.log("==============> STARTING GLOBAL SETUP"); await detox.globalInit(); } diff --git a/e2e/global-teardown.js b/e2e/global-teardown.js index 6202afbd2f..1926f701cb 100644 --- a/e2e/global-teardown.js +++ b/e2e/global-teardown.js @@ -1,7 +1,6 @@ const detox = require("detox"); async function globalTeardown() { - console.log("==============> STARTING GLOBAL TEARDOWN"); await detox.globalCleanup(); } diff --git a/e2e/helpers.js b/e2e/helpers.js index 512b3efc59..a1fc053914 100644 --- a/e2e/helpers.js +++ b/e2e/helpers.js @@ -3,38 +3,30 @@ import { readFileSync } from "fs"; const DEFAULT_TIMEOUT = 30000; export function waitAndTap(elementId, timeout) { - console.log(`==================> Waiting for element with id: ${elementId}`); waitFor(element(by.id(elementId))) .toBeVisible() .withTimeout(timeout || DEFAULT_TIMEOUT); - console.log(`==================> Tapping element with id: ${elementId}`); return element(by.id(elementId)).tap(); } export function waitForElement(elementId, timeout) { - console.log(`==================> Waiting for element with id: ${elementId}`); return waitFor(element(by.id(elementId))) .toBeVisible() .withTimeout(timeout || DEFAULT_TIMEOUT); } export function tap(elementId) { - console.log(`==================> Tapping element with id: ${elementId}`); return element(by.id(elementId)).tap(); } export function tapByText(text, index) { - console.log(`==================> Tapping element with text: ${text}`); return element(by.text(text)) .atIndex(index || 0) .tap(); } export async function typeText(elementId, text, focus = true) { - console.log( - `==================> Typing text '${text}' into element with id ${elementId}`, - ); if (focus) { await tap(elementId); } @@ -42,7 +34,6 @@ export async function typeText(elementId, text, focus = true) { } export function clearField(elementId) { - console.log(`==================> Clearing field with id: ${elementId}`); element(by.id(elementId)).replaceText(""); } @@ -54,9 +45,6 @@ export async function scrollToElementById( startPositionXAxis = NaN, startPositionYAxis = 0.5, ) { - console.log( - `==================> Scrolling to element with id: ${elementToScrollToId}`, - ); await waitFor(element(by.id(elementToScrollToId))) .toBeVisible() .whileElement(by.id(parentElementId)) diff --git a/e2e/models/onboarding/onboardingSteps.js b/e2e/models/onboarding/onboardingSteps.js index ef55e14a4c..8a85593c3e 100644 --- a/e2e/models/onboarding/onboardingSteps.js +++ b/e2e/models/onboarding/onboardingSteps.js @@ -19,16 +19,6 @@ export default class OnboardingSteps { } static async chooseToConnectYourNano() { - // scroll probably not needed now - // await testHelpers.scrollToElementById( - // `Onboarding - Connect|${device}`, - // "UseCaseSelectScrollView", - // 200, - // "down", - // NaN, - // 0.5, - // ); - await testHelpers.tap(`Onboarding - Connect`); } @@ -46,15 +36,12 @@ export default class OnboardingSteps { static async addDeviceViaBluetooth() { bridge.addDevices(); - await testHelpers.delay(5000); + await testHelpers.delay(5000); // give time for devices to appear await testHelpers.tapByText("Nano X de David"); - // await testHelpers.waitAndTap(`DeviceItemEnter ${david}`); - // set globally installed apps on device? - bridge.setInstalledApps(); + bridge.setInstalledApps(); // tell LLM what apps the mock device has - // open ledger manager - bridge.open(); + bridge.open(); // open ledger manager // Continue to welcome screen // await waitFor( diff --git a/e2e/models/passwordEntryPage.js b/e2e/models/passwordEntryPage.js index 1026bda100..709cb8f2b5 100644 --- a/e2e/models/passwordEntryPage.js +++ b/e2e/models/passwordEntryPage.js @@ -2,7 +2,6 @@ import * as testHelpers from "../helpers"; export default class PasswordEntryPage { static async enterPassword(password) { - // await testHelpers.typeText("password-text-input", password); if (device.getPlatform() === "ios") { await element(by.type("RCTUITextField")).typeText(password); } diff --git a/e2e/setup.js b/e2e/setup.js index 615f253665..2532c55493 100644 --- a/e2e/setup.js +++ b/e2e/setup.js @@ -2,15 +2,11 @@ import { execSync } from "child_process"; import * as bridge from "./bridge/server"; beforeAll(() => { - console.log("==============> STARTING BRIDGE INIT"); bridge.init(); - - console.log("==============> SETTING UP DEMO MODE"); setupDemoModeForScreenshots(); }); afterAll(() => { - console.log("==============> CLOSING BRIDGE"); bridge.close(); }); diff --git a/e2e/specs/onboarding.spec.js b/e2e/specs/onboarding.spec.js index 8ae60decb9..8b93608bf6 100644 --- a/e2e/specs/onboarding.spec.js +++ b/e2e/specs/onboarding.spec.js @@ -1,15 +1,12 @@ import OnboardingSteps from "../models/onboarding/onboardingSteps"; import PortfolioPage from "../models/portfolioPage"; -// import { expectBitmapsToBeEqual } from "../helpers"; describe("Onboarding", () => { beforeAll(async () => { - console.log("==============> STARTING ONBOARDING DEVICE LAUNCH"); await device.launchApp(); }); it("should be able to connect a Nano X", async () => { - console.log("==============> STARTING ONBOARDING TEST"); await OnboardingSteps.waitForPageToBeVisible(); await OnboardingSteps.startOnboarding(); await OnboardingSteps.chooseToSetupLedger(); @@ -23,10 +20,5 @@ describe("Onboarding", () => { await PortfolioPage.waitForPageToBeVisible(); await PortfolioPage.emptyPortfolioIsVisible(); - - // in future for screenshot comparison - // const image = await device.takeScreenshot("nanoX-onboarding-snapshot"); - // const snapshottedImagePath = `e2e/specs/snapshots/${device.getPlatform()}-nanoX-onboarding-snapshot.png`; - // expectBitmapsToBeEqual(image, snapshottedImagePath); }); }); diff --git a/e2e/specs/password.spec.js b/e2e/specs/password.spec.js index 8c83e5b9a8..1311189254 100644 --- a/e2e/specs/password.spec.js +++ b/e2e/specs/password.spec.js @@ -9,12 +9,10 @@ const CORRECT_PASSWORD = "passWORD$123!"; describe("Password Lock Screen", () => { beforeAll(async () => { - console.log("==============> STARTING PASSWORD DEVICE LAUNCH"); await device.launchApp(); }); it("should be able to enter the correct password", async () => { - console.log("==============> STARTING PASSWORD TEST"); await loadConfig("1AccountBTC1AccountETH", true); await PortfolioPage.waitForPageToBeVisible(); @@ -23,14 +21,11 @@ describe("Password Lock Screen", () => { await GeneralSettingsPage.togglePassword(); await GeneralSettingsPage.enterNewPassword(CORRECT_PASSWORD); await GeneralSettingsPage.enterNewPassword(CORRECT_PASSWORD); // confirm password step - - await device.sendToHome(); + await device.sendToHome(); // leave LLM app and go to phone's home screen await delay(60001); // password takes 60 seconds of app inactivity to activate - await device.launchApp(); - + await device.launchApp(); // restart LLM await PasswordEntryPage.enterPassword(CORRECT_PASSWORD); await PasswordEntryPage.login(); - await GeneralSettingsPage.isVisible(); }); });