Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
removing test butler and adding device object to test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ggilchrist-ledger committed Apr 14, 2022
1 parent c8029db commit 9b6b5ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/detox-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ jobs:
$ANDROID_HOME/platform-tools/adb devices
adb logcat -c
adb logcat *:E &
mkdir ./temp
curl -f -o ./temp/test-butler-app.apk https://repo1.maven.org/maven2/com/linkedin/testbutler/test-butler-app/2.2.1/test-butler-app-2.2.1.apk
adb install ./temp/test-butler-app.apk || adb install ./e2e/test-butler-app.apk
yarn detox test -c android.debug --loglevel verbose --record-logs failing --record-timeline all --take-screenshots failing
# mkdir ./temp
# curl -f -o ./temp/test-butler-app.apk https://repo1.maven.org/maven2/com/linkedin/testbutler/test-butler-app/2.2.1/test-butler-app-2.2.1.apk
# adb install ./temp/test-butler-app.apk || adb install ./e2e/test-butler-app.apk

- name: Run Android tests (with Test Butler)
if: steps.avd-cache.outputs.cache-hit == 'true'
Expand Down
13 changes: 4 additions & 9 deletions e2e/setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { execSync } from "child_process";
// import { device } from "detox";
import { device } from "detox";
import * as bridge from "./bridge/server";

// eslint-disable-next-line no-undef
Expand All @@ -13,13 +13,6 @@ beforeAll(async () => {

console.log("==============> SETTING UP DEMO MODE");
setupDemoModeForScreenshots();

// return device.launchApp({
// delete: true,
// launchArgs: {
// detoxURLBlacklistRegex: ".*://explorers.api.live.ledger.com/.*",
// },
// });
});

// eslint-disable-next-line no-undef
Expand All @@ -34,7 +27,9 @@ function setupDemoModeForScreenshots() {
execSync(
'xcrun simctl status_bar "iPhone 11 Pro" override --time "12:00" --batteryState charged --batteryLevel 100 --wifiBars 3 --cellularMode active --cellularBars 4',
);
} else {
}

if (device.getPlatform() === "android") {
// enter demo mode
execSync("adb shell settings put global sysui_demo_allowed 1");
// display time 12:00
Expand Down

0 comments on commit 9b6b5ef

Please sign in to comment.