How to use the detox.device.launchApp function in detox

To help you get started, we’ve selected a few detox examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flow-typed / flow-typed / definitions / npm / detox_v7.x.x / test_detox_v7.x.x.js View on Github external
}
};

// Detox Object API
// ----------------
detox.cleanup();
// $ExpectError
detox.init({ configurations: "" }, { initGlobals: 123, launchApp: false });
detox.init(configs, { initGlobals: false });

// Device Object API
// -----------------
device.launchApp({});
device.launchApp({ newInstance: true });
device.launchApp({ permissions: { calendar: "YES" } });
device.launchApp({ url: "url", newInstance: false });
device.launchApp({ userNotification: { title: "push" }, newInstance: true });
device.launchApp({ launchArgs: { arg1: 1, arg2: "2" } });
// $ExpectError
device.launchApp({ permissions: false, url: false });

// $ExpectError
device.terminateApp({ err: "err" });
device.terminateApp();
device.terminateApp("other.bundle.id");
device.reloadReactNative();
device.sendToHome();
device.installApp();
device.uninstallApp();
// $ExpectError
device.openURL({ url: "https://flow.org", sourceApp: false });
device.openURL({ url: "https://flow.org" });
github react-native-community / react-native-netinfo / example / e2e / testCases / emitOnListen.spec.js View on Github external
beforeEach(async () => {
    const url = 'netinfoexample://emitOnListen';
    await device.launchApp({url: url, newInstance: true});
  });
github react-native-community / react-native-netinfo / example / e2e / testCases / DeprecatedMultipleGetConnectionInfo.spec.js View on Github external
beforeEach(async () => {
    const url = 'netinfoexample://deprecatedMultipleGetConnectionInfo';
    await device.launchApp({url: url, newInstance: true});
  });