diff --git a/e2e/AndroidUtils.js b/e2e/AndroidUtils.js index 942233b82d..09a60f6790 100644 --- a/e2e/AndroidUtils.js +++ b/e2e/AndroidUtils.js @@ -16,28 +16,6 @@ const utils = { // TODO Change to use Detox's ADB (see keyboard driver) exec.execSync(`adb -s ${device.id} shell ${command}`); }, - setDemoMode: () => { - // enter demo mode - utils.executeShellCommand('settings put global sysui_demo_allowed 1'); - // display time 12:00 - utils.executeShellCommand( - 'am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200' - ); - // Display full mobile data with 4g type and no wifi - utils.executeShellCommand( - 'am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype 4g -e wifi false' - ); - // Hide notifications - utils.executeShellCommand( - 'am broadcast -a com.android.systemui.demo -e command notifications -e visible false' - ); - // Disable pointer location - utils.executeShellCommand('settings put system pointer_location 0'); - // Show full battery but not in charging state - utils.executeShellCommand( - 'am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100' - ); - }, }; export default utils; diff --git a/e2e/Overlay.test.js b/e2e/Overlay.test.js index c18bbbd70e..f980befcdb 100644 --- a/e2e/Overlay.test.js +++ b/e2e/Overlay.test.js @@ -59,8 +59,6 @@ describe('Overlay', () => { it.e2e(':android: should show banner overlay and not block the screen', async () => { const snapshottedImagePath = './e2e/assets/overlay_banner_padding.png'; - Android.setDemoMode(); - let expected = await device.takeScreenshot('without_banner'); await elementById(TestIDs.SHOW_BANNER_OVERLAY).tap(); await expect(elementById(TestIDs.BANNER_OVERLAY)).toBeVisible(); diff --git a/package.json b/package.json index abf6a777bd..0111e9ba53 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@typescript-eslint/eslint-plugin": "8.21.0", "@typescript-eslint/parser": "8.21.0", "clang-format": "^1.4.0", - "detox": "20.34.4", + "detox": "20.46.0", "detox-testing-library-rnn-adapter": "^2.0.3", "eslint": "^8.19.0", "eslint-config-prettier": "6.11.0", @@ -166,6 +166,19 @@ "type": "android.emulator", "device": { "avdName": "Pixel_3a_API_35" + }, + "systemUI": { + "pointerLocationBar": "hide", + "touches": "show", + "navigationMode": "3-button", + "statusBar": { + "notifications": "hide", + "clock": "1200", + "wifiSignal": "none", + "mobileSignal": "none", + "battery": "full", + "charging": false + } } } },