Command processing (3/n): Uninstall plugin
Summary: *Stack summary*: this stack refactors plugin management actions to perform them in a dispatcher rather than in the root reducer (store.tsx) as all of these actions has side effects. To do that, we store requested plugin management actions (install/update/uninstall, star/unstar) in a queue which is then handled by pluginManager dispatcher. This dispatcher then dispatches all required state updates. *Diff summary*: refactored "uninstall plugin" operation to perform it in pluginManager dispatcher Reviewed By: mweststrate Differential Revision: D26166198 fbshipit-source-id: d74a1d690102d9036c6d3d8612d2428f5ecef4e6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
24aed8fd45
commit
01f02b2cab
@@ -14,7 +14,7 @@ import {
|
||||
act as testingLibAct,
|
||||
} from '@testing-library/react';
|
||||
import {queries} from '@testing-library/dom';
|
||||
import {InstalledPluginDetails} from 'flipper-plugin-lib';
|
||||
import {BundledPluginDetails, InstalledPluginDetails} from 'flipper-plugin-lib';
|
||||
|
||||
import {
|
||||
RealFlipperClient,
|
||||
@@ -414,6 +414,24 @@ export function createMockPluginDetails(
|
||||
};
|
||||
}
|
||||
|
||||
export function createMockBundledPluginDetails(
|
||||
details?: Partial<BundledPluginDetails>,
|
||||
): BundledPluginDetails {
|
||||
return {
|
||||
id: 'TestBundledPlugin',
|
||||
name: 'TestBundledPlugin',
|
||||
specVersion: 0,
|
||||
pluginType: 'client',
|
||||
isBundled: true,
|
||||
isActivatable: true,
|
||||
main: '',
|
||||
source: '',
|
||||
title: 'Testing Bundled Plugin',
|
||||
version: '',
|
||||
...details,
|
||||
};
|
||||
}
|
||||
|
||||
function createMockDevice(options?: StartPluginOptions): RealFlipperDevice {
|
||||
const logListeners: (undefined | DeviceLogListener)[] = [];
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user