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
@@ -766,6 +766,8 @@ test('test determinePluginsToProcess for mutilple clients having plugins present
|
||||
failedPlugins: [],
|
||||
selectedPlugins: ['TestPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
};
|
||||
const op = determinePluginsToProcess(
|
||||
[client1, client2, client3],
|
||||
@@ -838,6 +840,8 @@ test('test determinePluginsToProcess for no selected plugin present in any clien
|
||||
failedPlugins: [],
|
||||
selectedPlugins: ['RandomPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
};
|
||||
const op = determinePluginsToProcess([client1, client2], device1, plugins);
|
||||
expect(op).toBeDefined();
|
||||
@@ -887,6 +891,8 @@ test('test determinePluginsToProcess for multiple clients on same device', async
|
||||
failedPlugins: [],
|
||||
selectedPlugins: ['TestPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
};
|
||||
const op = determinePluginsToProcess([client1, client2], device1, plugins);
|
||||
expect(op).toBeDefined();
|
||||
@@ -974,6 +980,8 @@ test('test determinePluginsToProcess for multiple clients on different device',
|
||||
failedPlugins: [],
|
||||
selectedPlugins: ['TestPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
};
|
||||
const op = determinePluginsToProcess(
|
||||
[client1Device1, client2Device1, client1Device2, client2Device2],
|
||||
@@ -1057,6 +1065,8 @@ test('test determinePluginsToProcess to ignore archived clients', async () => {
|
||||
failedPlugins: [],
|
||||
selectedPlugins: ['TestPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
};
|
||||
const op = determinePluginsToProcess(
|
||||
[client, archivedClient],
|
||||
|
||||
Reference in New Issue
Block a user