[DOCS] Refresh and automate screenshots for connector logs (#153510)

This commit is contained in:
Lisa Cawley 2023-03-23 11:27:00 -07:00 committed by GitHub
parent 9ff847dec7
commit 552e47280d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 116 additions and 14 deletions

View file

@ -119,12 +119,14 @@ connector types.
[role="screenshot"]
image::images/connector-filter-by-type.png[Filtering the connector list by types of connectors]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
You can delete individual connectors using the trash icon. Alternatively, select
multiple connectors and delete them in bulk using the *Delete* button.
[role="screenshot"]
image::images/connector-delete.png[Deleting connectors individually or in bulk]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
[NOTE]
============================================================================
@ -165,7 +167,7 @@ button appears in *{connectors-ui}*.
image::images/connectors-with-missing-secrets.png[Connectors with missing secrets]
[float]
[[montoring-connectors]]
[[monitoring-connectors]]
=== Monitoring connectors
The <<task-manager-health-monitoring,Task Manager health API>> helps you understand the performance of all tasks in your environment.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Before After
Before After

View file

@ -41,6 +41,7 @@ export default function ({ getPageObject, getService, loadTestFile }: FtrProvide
loadTestFile(require.resolve('./stack_alerting'));
loadTestFile(require.resolve('./stack_cases'));
loadTestFile(require.resolve('./stack_connectors'));
loadTestFile(require.resolve('./observability_cases'));
});
}

View file

@ -29,7 +29,6 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) {
});
loadTestFile(require.resolve('./list_view'));
loadTestFile(require.resolve('./connector_types'));
loadTestFile(require.resolve('./index_threshold_rule'));
loadTestFile(require.resolve('./tracking_containment_rule'));
});

View file

@ -44,17 +44,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await rules.api.deleteRule(ruleId);
});
it('connectors list screenshot', async () => {
await pageObjects.common.navigateToApp('connectors');
await pageObjects.header.waitUntilLoadingHasFinished();
await commonScreenshots.takeScreenshot(
'connector-listing',
screenshotDirectories,
1400,
1024
);
});
it('rules list screenshot', async () => {
await pageObjects.common.navigateToApp('triggersActions');
await pageObjects.header.waitUntilLoadingHasFinished();

View file

@ -9,7 +9,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const commonScreenshots = getService('commonScreenshots');
const screenshotDirectories = ['response_ops_docs', 'stack_alerting'];
const screenshotDirectories = ['response_ops_docs', 'stack_connectors'];
const pageObjects = getPageObjects(['common', 'header']);
const actions = getService('actions');
const testSubjects = getService('testSubjects');

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 { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const commonScreenshots = getService('commonScreenshots');
const browser = getService('browser');
const find = getService('find');
const testSubjects = getService('testSubjects');
const screenshotDirectories = ['response_ops_docs', 'stack_connectors'];
const pageObjects = getPageObjects(['common', 'header']);
describe('connectors', function () {
it('connectors list screenshot', async () => {
await pageObjects.common.navigateToApp('connectors');
await pageObjects.header.waitUntilLoadingHasFinished();
await commonScreenshots.takeScreenshot(
'connector-listing',
screenshotDirectories,
1400,
1024
);
const searchBox = await find.byCssSelector('[data-test-subj="actionsList"] .euiFieldSearch');
await searchBox.click();
await searchBox.clearValue();
await searchBox.type('my actionTypeId:(.index)');
await searchBox.pressKeys(browser.keys.ENTER);
const typeFilter = await find.byCssSelector(
'[data-test-subj="actionsList"] .euiFilterButton'
);
await typeFilter.click();
await commonScreenshots.takeScreenshot(
'connector-filter-by-type',
screenshotDirectories,
1400,
1024
);
const clearSearchButton = await testSubjects.find('clearSearchButton');
await clearSearchButton.click();
const checkAllButton = await testSubjects.find('checkboxSelectAll');
await checkAllButton.click();
await commonScreenshots.takeScreenshot('connector-delete', screenshotDirectories, 1400, 1024);
});
});
}

View file

@ -0,0 +1,59 @@
/*
* 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 { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ loadTestFile, getService }: FtrProviderContext) {
const actions = getService('actions');
const browser = getService('browser');
const es = getService('es');
const rules = getService('rules');
const testIndex = `test-index`;
describe('stack connectors', function () {
before(async () => {
await browser.setWindowSize(1920, 1080);
await actions.api.createConnector({
name: 'server-log-connector',
config: {},
secrets: {},
connectorTypeId: '.server-log',
});
await es.indices.create({
index: testIndex,
body: {
mappings: {
properties: {
date_updated: {
type: 'date',
format: 'epoch_millis',
},
},
},
},
});
await actions.api.createConnector({
name: 'my-index-connector',
config: {
index: testIndex,
},
secrets: {},
connectorTypeId: '.index',
});
});
after(async () => {
await rules.api.deleteAllRules();
await actions.api.deleteAllConnectors();
await es.indices.delete({ index: testIndex });
});
loadTestFile(require.resolve('./connectors'));
loadTestFile(require.resolve('./connector_types'));
});
}