[DOCS] Automate screenshot for Amazon bedrock connector (#169463)

This commit is contained in:
Lisa Cawley 2023-10-23 13:31:03 -07:00 committed by GitHub
parent c2e4d40a23
commit f5d7c86cc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 2 deletions

View file

@ -18,8 +18,8 @@ The {bedrock} connector uses https://github.com/axios/axios[axios] to send a POS
You can create connectors in *{stack-manage-app} > {connectors-ui}*. For example:
[role="screenshot"]
// TODO: need logo before screenshot
image::management/connectors/images/bedrock-connector.png[{bedrock} connector]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
[float]
[[bedrock-connector-configuration]]
@ -41,8 +41,8 @@ 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"]
// TODO: need logo before screenshot
image::management/connectors/images/bedrock-params.png[{bedrock} params test]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
The {bedrock} actions have the following configuration properties.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 KiB

After

Width:  |  Height:  |  Size: 284 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 173 KiB

Before After
Before After

View file

@ -0,0 +1,37 @@
/*
* 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 screenshotDirectories = ['response_ops_docs', 'stack_connectors'];
const pageObjects = getPageObjects(['common', 'header']);
const actions = getService('actions');
const testSubjects = getService('testSubjects');
describe('Amazon bedrock connector', function () {
it('Amazon bedrock connector screenshots', async () => {
await pageObjects.common.navigateToApp('connectors');
await pageObjects.header.waitUntilLoadingHasFinished();
await actions.common.openNewConnectorForm('bedrock');
await testSubjects.setValue('nameInput', 'Bedrock test connector');
await testSubjects.setValue('secrets.accessKey-input', 'testkey');
await testSubjects.setValue('secrets.secret-input', 'testsecret');
await commonScreenshots.takeScreenshot(
'bedrock-connector',
screenshotDirectories,
1920,
1200
);
await testSubjects.click('create-connector-flyout-save-test-btn');
await testSubjects.click('toastCloseButton');
await commonScreenshots.takeScreenshot('bedrock-params', screenshotDirectories);
await testSubjects.click('euiFlyoutCloseButton');
});
});
}

View file

@ -54,6 +54,7 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) {
});
loadTestFile(require.resolve('./connectors'));
loadTestFile(require.resolve('./bedrock_connector'));
loadTestFile(require.resolve('./email_connector'));
loadTestFile(require.resolve('./generative_ai_connector'));
loadTestFile(require.resolve('./index_connector'));