diff --git a/x-pack/plugins/actions/server/sub_action_framework/register.test.ts b/x-pack/plugins/actions/server/sub_action_framework/register.test.ts index f1a231c2344a0..59e71ffb69bfc 100644 --- a/x-pack/plugins/actions/server/sub_action_framework/register.test.ts +++ b/x-pack/plugins/actions/server/sub_action_framework/register.test.ts @@ -82,4 +82,25 @@ describe('Registration', () => { expect(mockRenderParameterTemplates).toHaveBeenCalledWith(logger, params, variables, actionId); expect(rendered).toBe(renderedVariables); }); + + it('registers a system connector correctly', async () => { + register({ + actionTypeRegistry, + connector: { ...connector, isSystemActionType: true }, + configurationUtilities: mockedActionsConfig, + logger, + }); + + expect(actionTypeRegistry.register).toHaveBeenCalledTimes(1); + expect(actionTypeRegistry.register).toHaveBeenCalledWith({ + id: connector.id, + name: connector.name, + minimumLicenseRequired: connector.minimumLicenseRequired, + supportedFeatureIds: connector.supportedFeatureIds, + validate: expect.anything(), + executor: expect.any(Function), + renderParameterTemplates: expect.any(Function), + isSystemActionType: true, + }); + }); }); diff --git a/x-pack/plugins/actions/server/sub_action_framework/register.ts b/x-pack/plugins/actions/server/sub_action_framework/register.ts index 80331648244ae..0b8fe240c155a 100644 --- a/x-pack/plugins/actions/server/sub_action_framework/register.ts +++ b/x-pack/plugins/actions/server/sub_action_framework/register.ts @@ -40,5 +40,6 @@ export const register = { validators?: Array | SecretsValidator>; getService: (params: ServiceParams) => SubActionConnector; renderParameterTemplates?: RenderParameterTemplates; + isSystemActionType?: boolean; } export interface ExecutorParams extends ActionTypeParams {