Exemple #1
0
 return async function(dispatch) {
   // Remove custom device from device storage
   await removeDevice(device, "custom");
   dispatch({
     type: REMOVE_DEVICE,
     device,
     deviceType: "custom",
   });
 };
Exemple #2
0
    return function* (dispatch, getState) {
      // Check if the custom device is currently associated with any viewports
      let { viewports } = getState();
      for (let viewport of viewports) {
        if (viewport.device == device.name) {
          dispatch(removeDeviceAssociation(viewport.id));
        }
      }

      // Remove custom device from device storage
      yield removeDevice(device, "custom");
      dispatch({
        type: REMOVE_DEVICE,
        device,
        deviceType: "custom",
      });
    };
Exemple #3
0
 registerCleanupFunction(() => {
   // Note that assertions in cleanup functions are not displayed unless they failed.
   ok(removeDevice(device), `Removed Test Device "${device.name}" from the list.`);
 });