How to use the node-simctl.deleteDevice function in node-simctl

To help you get started, we’ve selected a few node-simctl 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 appium / appium-ios-simulator / test / functional / simulator-e2e-specs.js View on Github external
after(async function () {
      try {
        await killAllSimulators();
        for (const udid of _.keys(simulatorsMapping)) {
          try {
            await simctl.deleteDevice(udid);
          } catch (err) {
            console.log(`Error deleting simulator '${udid}': ${err.message}`); // eslint-disable-line
          }
        }
      } finally {
        simulatorsMapping = {};
      }
    });
    beforeEach(killAllSimulators);
github appium / appium-ios-simulator / test / functional / simulator-e2e-specs.js View on Github external
async function deleteSimulator (udid, version) {
  // only want to get rid of the device if it is present
  let devices = await simctl.getDevices();
  if (!devices[version]) {
    return;
  }
  let devicePresent = devices[version]
    .filter((device) => {
      return device.udid === udid;
    }).length > 0;
  if (devicePresent) {
    await simctl.deleteDevice(udid);
  }
}
github appium / appium-ios-simulator / test / functional / settings-e2e-specs.js View on Github external
after(async function () {
    // only want to get rid of the device if it is present
    let devicePresent = (await simctl.getDevices())[deviceType.version]
      .filter((device) => {
        return device.udid === udid;
      }).length > 0;
    if (devicePresent) {
      await killAllSimulators();
      await simctl.deleteDevice(udid);
    }
  });
github appium / appium-ios-simulator / test / functional / utils-e2e-specs.js View on Github external
afterEach(async function () {
    await killAllSimulators();
    try {
      await simctl.deleteDevice(sim.udid);
    } catch (ign) {}
  });
  it('should be able to kill the simulators', async function () {
github appium / appium-xcuitest-driver / test / functional / driver / webdriveragent-e2e-specs.js View on Github external
after(async function () {
      this.timeout(MOCHA_TIMEOUT);

      await shutdownSimulator(device);

      await deleteDevice(device.udid);
    });
github appium / appium-ios-simulator / lib / extensions / isolate-sim.js View on Github external
extensions.isolateSim = async function isolateSim () {
  log.debug('Isolating the requested simulator by deleting all others');
  let udids = await getAllUdids();

  for (let udid of _.without(udids, this.udid)) {
    await deleteDevice(udid);
  }
};
github appium / appium-ios-simulator / lib / simulator-xcode-6.js View on Github external
async delete () {
    await simctl.deleteDevice(this.udid);
  }