Skip to content

Commit

Permalink
[8.x] [DOCS] Add TheHive connector to automated Observability case sc…
Browse files Browse the repository at this point in the history
…reenshots (#193913) (#200113)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[DOCS] Add TheHive connector to automated Observability case
screenshots (#193913)](#193913)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-14T03:40:55Z","message":"[DOCS]
Add TheHive connector to automated Observability case screenshots
(#193913)","sha":"bdf62b6b500f041d57a6ee74ddeee88138d42f26","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","docs","Feature:Cases","backport:version","v8.17.0"],"title":"[DOCS]
Add TheHive connector to automated Observability case
screenshots","number":193913,"url":"https://github.com/elastic/kibana/pull/193913","mergeCommit":{"message":"[DOCS]
Add TheHive connector to automated Observability case screenshots
(#193913)","sha":"bdf62b6b500f041d57a6ee74ddeee88138d42f26"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193913","number":193913,"mergeCommit":{"message":"[DOCS]
Add TheHive connector to automated Observability case screenshots
(#193913)","sha":"bdf62b6b500f041d57a6ee74ddeee88138d42f26"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <[email protected]>
  • Loading branch information
kibanamachine and lcawl authored Nov 14, 2024
1 parent 5bb102e commit 1779727
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const enabledActionTypes = [
'.servicenow-itom',
'.servicenow-sir',
'.swimlane',
'.thehive',
];

export default createTestConfig({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,31 @@ import { FtrProviderContext } from '../../../../../ftr_provider_context';
import { navigateToCasesApp } from '../../../../../../shared/lib/cases';

export default function ({ getPageObject, getPageObjects, getService }: FtrProviderContext) {
const retry = getService('retry');
const svlCases = getService('svlCases');
const svlCommonScreenshots = getService('svlCommonScreenshots');
const svlCommonPage = getPageObject('svlCommonPage');
const screenshotDirectories = ['response_ops_docs', 'observability_cases'];
const testSubjects = getService('testSubjects');
const owner = OBSERVABILITY_OWNER;

// FLAKY:https://github.com/elastic/kibana/issues/189058
describe.skip('Observability case settings', function () {
describe('Observability case settings', function () {
before(async () => {
await svlCommonPage.loginWithPrivilegedRole();
});
after(async () => {
await svlCases.api.deleteAllCaseItems();
});

it('case settings screenshots', async () => {
await navigateToCasesApp(getPageObject, getService, owner);
await retry.waitFor('configure-case-button exist', async () => {
return await testSubjects.exists('configure-case-button');
});
await testSubjects.click('configure-case-button');
await retry.waitFor('add-custom-field exist', async () => {
return await testSubjects.exists('add-custom-field');
});
await testSubjects.click('add-custom-field');
await svlCommonScreenshots.takeScreenshot(
'observability-cases-custom-fields',
Expand All @@ -33,25 +43,39 @@ export default function ({ getPageObject, getPageObjects, getService }: FtrProvi
700
);
await testSubjects.setValue('custom-field-label-input', 'my-field');
await retry.waitFor('common-flyout-save exist', async () => {
return await testSubjects.exists('common-flyout-save');
});
await testSubjects.click('common-flyout-save');
await svlCommonScreenshots.takeScreenshot(
'observability-cases-settings',
screenshotDirectories
);
await retry.waitFor('add-template exist', async () => {
return await testSubjects.exists('add-template');
});
await testSubjects.click('add-template');
await svlCommonScreenshots.takeScreenshot(
'observability-cases-templates',
screenshotDirectories,
1400,
1000
);
await retry.waitFor('common-flyout-cancel exist', async () => {
return await testSubjects.exists('common-flyout-cancel');
});
await testSubjects.click('common-flyout-cancel');
await testSubjects.click('dropdown-connectors');
await testSubjects.click('dropdown-connector-add-connector');
await retry.waitFor('dropdown-connectors exist', async () => {
return await testSubjects.exists('dropdown-connectors');
});
await testSubjects.click('add-new-connector');
await svlCommonScreenshots.takeScreenshot(
'observability-cases-add-connector',
screenshotDirectories
);
await retry.waitFor('euiFlyoutCloseButton exist', async () => {
return await testSubjects.exists('euiFlyoutCloseButton');
});
await testSubjects.click('euiFlyoutCloseButton');
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import { navigateToCasesApp } from '../../../../../../shared/lib/cases';

export default function ({ getPageObject, getPageObjects, getService }: FtrProviderContext) {
const pageObjects = getPageObjects(['common', 'header', 'svlCommonPage', 'svlCommonNavigation']);
const retry = getService('retry');
const svlCases = getService('svlCases');
const svlCommonScreenshots = getService('svlCommonScreenshots');
const screenshotDirectories = ['response_ops_docs', 'security_cases'];
const testSubjects = getService('testSubjects');
const owner = SECURITY_SOLUTION_OWNER;

// FLAKY: https://github.com/elastic/kibana/issues/188997
describe.skip('security case settings', function () {
describe('security case settings', function () {
after(async () => {
await svlCases.api.deleteAllCaseItems();
});
Expand All @@ -29,30 +29,44 @@ export default function ({ getPageObject, getPageObjects, getService }: FtrProvi

it('case settings screenshot', async () => {
await navigateToCasesApp(getPageObject, getService, owner);
await retry.waitFor('configure-case-button exist', async () => {
return await testSubjects.exists('configure-case-button');
});
await testSubjects.click('configure-case-button');
await pageObjects.header.waitUntilLoadingHasFinished();
await retry.waitFor('add-custom-field exist', async () => {
return await testSubjects.exists('add-custom-field');
});
await testSubjects.click('add-custom-field');
await svlCommonScreenshots.takeScreenshot(
'security-cases-custom-fields',
screenshotDirectories,
1400,
700
);
await retry.waitFor('custom-field-label-input exist', async () => {
return await testSubjects.exists('custom-field-label-input');
});
await testSubjects.setValue('custom-field-label-input', 'my-field');
await retry.waitFor('common-flyout-save exist', async () => {
return await testSubjects.exists('common-flyout-save');
});
await testSubjects.click('common-flyout-save');
await svlCommonScreenshots.takeScreenshot('security-cases-settings', screenshotDirectories);
await retry.waitFor('add-template to exist', async () => {
return await testSubjects.exists('add-template');
});
await testSubjects.click('add-template');
await svlCommonScreenshots.takeScreenshot(
'security-cases-templates',
screenshotDirectories,
1400,
1000
);
await retry.waitFor('common-flyout-cancel to exist', async () => {
return await testSubjects.exists('common-flyout-cancel');
});
await testSubjects.click('common-flyout-cancel');
await testSubjects.click('dropdown-connectors');
await testSubjects.click('dropdown-connector-add-connector');
await svlCommonScreenshots.takeScreenshot('security-cases-connectors', screenshotDirectories);
await testSubjects.click('euiFlyoutCloseButton');
});
});
}

0 comments on commit 1779727

Please sign in to comment.