[8.12] [DOCS] Automate Tines connector screenshots (#166313) (#173705)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[DOCS] Automate Tines connector screenshots
(#166313)](https://github.com/elastic/kibana/pull/166313)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-12-20T04:31:11Z","message":"[DOCS]
Automate Tines connector screenshots
(#166313)","sha":"3df2c4f9662c737a32bae92c3fe81b5f0c1600c8","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","docs","Feature:Actions/ConnectorTypes","backport:prev-minor","v8.12.0","v8.13.0"],"number":166313,"url":"https://github.com/elastic/kibana/pull/166313","mergeCommit":{"message":"[DOCS]
Automate Tines connector screenshots
(#166313)","sha":"3df2c4f9662c737a32bae92c3fe81b5f0c1600c8"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/166313","number":166313,"mergeCommit":{"message":"[DOCS]
Automate Tines connector screenshots
(#166313)","sha":"3df2c4f9662c737a32bae92c3fe81b5f0c1600c8"}}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
This commit is contained in:
Kibana Machine 2023-12-20 00:40:47 -05:00 committed by GitHub
parent 3418996e7b
commit 14aa279d6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 56 additions and 11 deletions

View file

@ -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 <<execute-connector-api,run connector API>> 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]]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 155 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Before After
Before After

View file

@ -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'));
});

View file

@ -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');
});
});
}