diff --git a/docs/management/connectors/action-types/tines.asciidoc b/docs/management/connectors/action-types/tines.asciidoc index cdaf56912d0f0..c9888ab7b9087 100644 --- a/docs/management/connectors/action-types/tines.asciidoc +++ b/docs/management/connectors/action-types/tines.asciidoc @@ -19,6 +19,7 @@ or as needed when you're creating a rule. For example: [role="screenshot"] image::management/connectors/images/tines-connector.png[Tines connector] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. [float] [[tines-connector-configuration]] @@ -34,23 +35,14 @@ API Token:: A Tines API token created by the user. For more information, refer [[tines-action-parameters]] === Test connectors -Tines actions have the following parameters. - -Story:: The Story to send the events to. -Webhook:: The Webhook action from the previous story that will receive the events, it is the data entry point. - You can test connectors with the <> or as you're creating or editing the connector in {kib}. For example: [role="screenshot"] image::management/connectors/images/tines-params-test.png[Tines params test] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. -Once the Tines connector has been configured in an alerting rule: - -[role="screenshot"] -image::management/connectors/images/tines-alerting.png[Tines rule alert] - -It will send a POST request to the Tines webhook action on every action that runs with at least one result. +If you create a rule action that uses the Tines connector, you can likewise configure the POST request that is sent to the Tines webhook action when the rule conditions are met. [float] [[webhookUrlFallback-tines-configuration]] diff --git a/docs/management/connectors/images/tines-alerting.png b/docs/management/connectors/images/tines-alerting.png deleted file mode 100644 index 765cd95abb103..0000000000000 Binary files a/docs/management/connectors/images/tines-alerting.png and /dev/null differ diff --git a/docs/management/connectors/images/tines-connector.png b/docs/management/connectors/images/tines-connector.png index b4a1b12a83f0c..b63b1b33041cc 100644 Binary files a/docs/management/connectors/images/tines-connector.png and b/docs/management/connectors/images/tines-connector.png differ diff --git a/docs/management/connectors/images/tines-params-test.png b/docs/management/connectors/images/tines-params-test.png index a7211b62ad95a..ecc736aa0ba1b 100644 Binary files a/docs/management/connectors/images/tines-params-test.png and b/docs/management/connectors/images/tines-params-test.png differ diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/index.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/index.ts index 9acb3600587c3..25b8384509799 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/index.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/index.ts @@ -64,6 +64,7 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) { loadTestFile(require.resolve('./server_log_connector')); loadTestFile(require.resolve('./servicenow_itom_connector')); loadTestFile(require.resolve('./slack_connector')); + loadTestFile(require.resolve('./tines_connector')); loadTestFile(require.resolve('./webhook_connector')); loadTestFile(require.resolve('./xmatters_connector')); }); diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/tines_connector.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/tines_connector.ts new file mode 100644 index 0000000000000..6c399f4b1b9ec --- /dev/null +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/tines_connector.ts @@ -0,0 +1,52 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + ExternalServiceSimulator, + getExternalServiceSimulatorPath, +} from '@kbn/actions-simulators-plugin/server/plugin'; +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const commonScreenshots = getService('commonScreenshots'); + const screenshotDirectories = ['response_ops_docs', 'stack_connectors']; + const pageObjects = getPageObjects(['common', 'header']); + const actions = getService('actions'); + const kibanaServer = getService('kibanaServer'); + const testSubjects = getService('testSubjects'); + let simulatorUrl: string; + let editSimulatorUrl: string; + + describe('tines connector', function () { + before(async () => { + simulatorUrl = kibanaServer.resolveUrl( + getExternalServiceSimulatorPath(ExternalServiceSimulator.TINES) + ); + editSimulatorUrl = simulatorUrl.replace('/elastic:changeme@', '/'); + }); + + beforeEach(async () => { + await pageObjects.common.navigateToApp('connectors'); + await pageObjects.header.waitUntilLoadingHasFinished(); + }); + + it('tines connector screenshots', async () => { + await pageObjects.common.navigateToApp('connectors'); + await pageObjects.header.waitUntilLoadingHasFinished(); + await actions.common.openNewConnectorForm('tines'); + await testSubjects.setValue('nameInput', 'Tines test connector'); + await testSubjects.setValue('config.url-input', editSimulatorUrl); + await testSubjects.setValue('secrets.email-input', 'test@example.com'); + await testSubjects.setValue('secrets.token-input', 'tester'); + await commonScreenshots.takeScreenshot('tines-connector', screenshotDirectories); + await testSubjects.click('create-connector-flyout-save-test-btn'); + await pageObjects.common.clearAllToasts(); + await commonScreenshots.takeScreenshot('tines-params-test', screenshotDirectories); + await testSubjects.click('euiFlyoutCloseButton'); + }); + }); +}