Skip to content

Commit

Permalink
chore(llm): 👌 always skip the analytics prompt in e2e tests (#7890)
Browse files Browse the repository at this point in the history
* chore(llm): always skip the analytics prompt in e2e tests

* chore(llm): do not override llmAnalyticsOptInPrompt via the env file
  • Loading branch information
thesan authored Sep 26, 2024
1 parent b7e2010 commit fa56035
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-goats-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Always skip the analytics prompt in e2e tests
2 changes: 1 addition & 1 deletion apps/ledger-live-mobile/.env.mock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ADJUST_APP_TOKEN=cbxft2ch7wn4
BRAZE_ANDROID_API_KEY="be5e1bc8-43f1-4864-b097-076a3c693a43"
BRAZE_IOS_API_KEY="e0a7dfaf-fc30-48f6-b998-01dbebbb73a4"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
FEATURE_FLAGS={"ratingsPrompt":{"enabled":false},"brazePushNotifications":{"enabled":false},"llmAnalyticsOptInPrompt":{"enabled":false}}
FEATURE_FLAGS={"ratingsPrompt":{"enabled":false},"brazePushNotifications":{"enabled":false}}
# Fix random iOS app crash https://github.com/wix/Detox/pull/3135
SIMCTL_CHILD_NSZombieEnabled=YES
MOCK_REMOTE_LIVE_MANIFEST=[{"name":"Dummy Wallet API Live App","homepageUrl":"https://developers.ledger.com/","icon":"","platforms":["ios","android","desktop"],"apiVersion":"2.0.0","manifestVersion":"1","branch":"stable","categories":["tools"],"currencies":"*","content":{"shortDescription":{"en":"App to test the Wallet API"},"description":{"en":"App to test the Wallet API with Playwright"}},"permissions":["account.list","account.receive","account.request","currency.list","device.close","device.exchange","device.transport","message.sign","transaction.sign","transaction.signAndBroadcast","storage.set","storage.get","bitcoin.getXPub","wallet.capabilities","wallet.userId","wallet.info"],"domains":["http://*"],"visibility":"complete","id":"dummy-live-app","url":"http://localhost:52619"}]
5 changes: 4 additions & 1 deletion apps/ledger-live-mobile/e2e/bridge/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Server, WebSocket } from "ws";
import path from "path";
import fs from "fs";
import net from "net";
import merge from "lodash/merge";
import { toAccountRaw } from "@ledgerhq/live-common/account/index";
import { NavigatorName } from "../../src/const";
import { Subject } from "rxjs";
Expand Down Expand Up @@ -83,7 +84,9 @@ export async function loadConfig(fileName: string, agreed: true = true): Promise

const { data } = JSON.parse(f.toString());

await postMessage({ type: "importSettings", id: uniqueId(), payload: data.settings });
const defaultSettings = { shareAnalytics: true, hasSeenAnalyticsOptInPrompt: true };
const settings = merge(defaultSettings, data.settings);
await postMessage({ type: "importSettings", id: uniqueId(), payload: settings });

navigate(NavigatorName.Base);

Expand Down

0 comments on commit fa56035

Please sign in to comment.