Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 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" });
// $ExpectError
device.sendUserNotification();
const userNotificationCalendarTrigger = {
trigger: {
type: "calendar",
"date-components": {
era: 1,
year: 2017,
month: 1,
before(async() => {
await sleep(5000);
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(2000);
await device.reloadReactNative();
await element(by.id('rooms-list-view-create-channel')).tap();
await waitFor(element(by.id('new-message-view'))).toBeVisible().withTimeout(2000);
});
beforeEach(async () => {
await device.reloadReactNative()
})
before(async() => {
await device.reloadReactNative();
await navigateToRegister();
});
before(async() => {
await device.reloadReactNative();
await navigateToRoom();
});
beforeEach(async () => {
const { client } = rndebugger;
await client.execute(() => (window.confirm = () => true));
await device.reloadReactNative();
await delay(500);
});
before(async() => {
await device.reloadReactNative();
await expect(element(by.id('rooms-list-view'))).toBeVisible();
await element(by.id('rooms-list-view-sidebar')).tap();
await waitFor(element(by.id('sidebar-view'))).toBeVisible().withTimeout(2000);
await waitFor(element(by.id('sidebar-settings'))).toBeVisible().withTimeout(2000);
await element(by.id('sidebar-settings')).tap();
await waitFor(element(by.id('settings-view'))).toBeVisible().withTimeout(2000);
});
before(async() => {
await device.reloadReactNative();
await navigateToRoomInfo('c');
});
before(async() => {
await device.reloadReactNative();
await waitFor(element(by.id('rooms-list-view'))).toBeVisible().withTimeout(10000);
});
before(async() => {
await device.reloadReactNative();
});