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 Observability and Security case setting screenshots #168774

Merged
merged 6 commits into from
Oct 23, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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 ({ getPageObjects, getService }: FtrProviderContext) {
const cases = getService('cases');
const commonScreenshots = getService('commonScreenshots');
const pageObjects = getPageObjects(['common', 'header']);
const screenshotDirectories = ['response_ops_docs', 'observability_cases'];
const testSubjects = getService('testSubjects');

describe('Observability case settings and custom fields', function () {
it('case settings screenshots', async () => {
await cases.navigation.navigateToApp('observability/cases', 'cases-all-title');
await pageObjects.header.waitUntilLoadingHasFinished();
await testSubjects.click('configure-case-button');
await commonScreenshots.takeScreenshot('cases-settings', screenshotDirectories);
await testSubjects.click('add-custom-field');
await commonScreenshots.takeScreenshot(
'cases-add-custom-field',
screenshotDirectories,
1400,
600
);
await testSubjects.setValue('custom-field-label-input', 'my-field');
await testSubjects.click('custom-field-flyout-save');
await commonScreenshots.takeScreenshot(
'cases-custom-field-settings',
screenshotDirectories,
1400,
1024
);
});
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ loadTestFile }: FtrProviderContext) {
describe('observability cases', function () {
loadTestFile(require.resolve('./list_view'));
loadTestFile(require.resolve('./custom_fields'));
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,11 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
1024
);
});

it('case settings screenshot', async () => {
await cases.navigation.navigateToApp('observability/cases', 'cases-all-title');
await testSubjects.click('configure-case-button');
await commonScreenshots.takeScreenshot('add-case-connector', screenshotDirectories);
});
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* 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 pageObjects = getPageObjects(['common', 'header']);
const screenshotDirectories = ['response_ops_docs', 'security_cases'];
const testSubjects = getService('testSubjects');

describe('Security case settings and custom fields', function () {
it('case settings screenshots', async () => {
await pageObjects.common.navigateToApp('security', { path: 'cases' });
await pageObjects.header.waitUntilLoadingHasFinished();
await testSubjects.click('configure-case-button');
await commonScreenshots.takeScreenshot('cases-settings', screenshotDirectories);
await testSubjects.click('add-custom-field');
await commonScreenshots.takeScreenshot(
'cases-add-custom-field',
screenshotDirectories,
1400,
600
);
await testSubjects.setValue('custom-field-label-input', 'my-field');
await testSubjects.click('custom-field-flyout-save');
await commonScreenshots.takeScreenshot(
'cases-custom-field-settings',
screenshotDirectories,
1400,
1024
);
});
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ loadTestFile }: FtrProviderContext) {
describe('security cases', function () {
loadTestFile(require.resolve('./list_view'));
loadTestFile(require.resolve('./custom_fields'));
});
}
Loading