Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Automate Tines connector screenshots #166313

Merged
merged 9 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions docs/management/connectors/action-types/tines.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand All @@ -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]]
Expand Down
Binary file not shown.
Binary file modified docs/management/connectors/images/tines-connector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/connectors/images/tines-params-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) {
loadTestFile(require.resolve('./servicenow_itom_connector'));
loadTestFile(require.resolve('./servicenow_itsm_connector'));
loadTestFile(require.resolve('./slack_connector'));
loadTestFile(require.resolve('./tines_connector'));
loadTestFile(require.resolve('./webhook_connector'));
loadTestFile(require.resolve('./xmatters_connector'));
});
Expand Down
Original file line number Diff line number Diff line change
@@ -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', '[email protected]');
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');
});
});
}
Loading