Fix activatePlugin measurements not completing
Summary: `activatePlugin` events where not recorded correctly for Sandy plugins. Although the starting measuerments is fired the `connections` reducer, the completing event fires from `PluginContainer`. Since this is done as part of a ref-update (!!), see [here](https://www.internalfb.com/intern/diffusion/FBS/browse/master/xplat/sonar/desktop/app/src/PluginContainer.tsx?commit=65a625ea9941&lines=155), and the ref to the corresponding element is not set for Sandy plugins, the event was never marked as completed. Fixed this by making it part of the `activate` life-cycle event of Sandy plugins. Reviewed By: passy Differential Revision: D25421537 fbshipit-source-id: 5cbfeb91cc12e4520fa271bab24034094d7ddb39
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8dc321c1ee
commit
4832d6275b
@@ -36,6 +36,7 @@ import {
|
||||
} from '../plugin/DevicePlugin';
|
||||
import {BasePluginInstance} from '../plugin/PluginBase';
|
||||
import {FlipperLib} from '../plugin/FlipperLib';
|
||||
import {stubLogger} from '../utils/Logger';
|
||||
|
||||
type Renderer = RenderResult<typeof queries>;
|
||||
|
||||
@@ -346,6 +347,7 @@ export function renderDevicePlugin<Module extends FlipperDevicePluginModule>(
|
||||
|
||||
export function createMockFlipperLib(options?: StartPluginOptions): FlipperLib {
|
||||
return {
|
||||
logger: stubLogger,
|
||||
enableMenuEntries: jest.fn(),
|
||||
createPaste: jest.fn(),
|
||||
GK(gk: string) {
|
||||
|
||||
Reference in New Issue
Block a user