import { execSync } from "child_process" ; import { device } from "detox" ; export async function setStatusBar ( ) { if ( device . getPlatform ( ) === "ios" ) { execSync ( "xcrun simctl status_bar booted override --time 9:41 --batteryState charged --batteryLevel 100 --wifiBars 3 --cellularMode active --cellularBars 4" ) ; } else { execSync ( "adb shell settings put global sysui_demo_allowed 1" ) ; execSync ( "adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1850" ) ; execSync ( "adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype 4g -e wifi false" ) ; execSync ( "adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false" ) ; execSync ( "adb shell am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100" ) ; } }