Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions e2e/AndroidUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 0 additions & 2 deletions e2e/Overlay.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
}
}
}
},
Expand Down