Skip to content

Commit

Permalink
Automate ServiceNow SecOps screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Dec 22, 2023
1 parent 8e3958e commit 4b9ea89
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ or as needed when you're creating a rule. You must choose whether to use OAuth f

[role="screenshot"]
image::management/connectors/images/servicenow-sir-connector-basic.png[{sn-sir} connector using basic auth]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

[role="screenshot"]
image::management/connectors/images/servicenow-sir-connector-oauth.png[{sn-sir} connector using OAuth]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

[float]
[[servicenow-sir-connector-configuration]]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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('./server_log_connector'));
loadTestFile(require.resolve('./servicenow_itom_connector'));
loadTestFile(require.resolve('./servicenow_itsm_connector'));
loadTestFile(require.resolve('./servicenow_sir_connector'));
loadTestFile(require.resolve('./slack_connector'));
loadTestFile(require.resolve('./tines_connector'));
loadTestFile(require.resolve('./webhook_connector'));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* 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('servicenow secops connector', function () {
beforeEach(async () => {
await pageObjects.common.navigateToApp('connectors');
await pageObjects.header.waitUntilLoadingHasFinished();
});

it('servicenow secops connector screenshots', async () => {
await pageObjects.common.navigateToApp('connectors');
await pageObjects.header.waitUntilLoadingHasFinished();
await actions.common.openNewConnectorForm('servicenow-sir');
await testSubjects.setValue('nameInput', 'ServiceNow SecOps test connector');
await testSubjects.setValue('credentialsApiUrlFromInput', 'https://dev123.service-now.com');
await testSubjects.click('input');
await commonScreenshots.takeScreenshot(
'servicenow-sir-connector-oauth',
screenshotDirectories,
1920,
1600
);
await testSubjects.click('input');
await testSubjects.setValue('connector-servicenow-username-form-input', 'testuser');
await testSubjects.setValue('connector-servicenow-password-form-input', 'testpassword');
await commonScreenshots.takeScreenshot(
'servicenow-sir-connector-basic',
screenshotDirectories,
1920,
1400
);
await testSubjects.click('euiFlyoutCloseButton');
});
});
}

0 comments on commit 4b9ea89

Please sign in to comment.