Skip to content

Commit

Permalink
[8.6] [ML] Add automated screenshot for finding anomalies page (elast…
Browse files Browse the repository at this point in the history
…ic#146916) (elastic#147214)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[ML] Add automated screenshot for finding anomalies page
(elastic#146916)](elastic#146916)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2022-12-07T21:27:27Z","message":"[ML]
Add automated screenshot for finding anomalies page
(elastic#146916)","sha":"27077dfca04e0b33832f40ad34abd1950290cef2","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","v8.7.0","8.6.1","v8.5.3"],"number":146916,"url":"https://github.com/elastic/kibana/pull/146916","mergeCommit":{"message":"[ML]
Add automated screenshot for finding anomalies page
(elastic#146916)","sha":"27077dfca04e0b33832f40ad34abd1950290cef2"}},"sourceBranch":"main","suggestedTargetBranches":["8.5"],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146916","number":146916,"mergeCommit":{"message":"[ML]
Add automated screenshot for finding anomalies page
(elastic#146916)","sha":"27077dfca04e0b33832f40ad34abd1950290cef2"}},{"branch":"8.5","label":"v8.5.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
  • Loading branch information
kibanamachine and lcawl authored Dec 7, 2022
1 parent b183fc5 commit 547b33c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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';

import { ECOMMERCE_INDEX_PATTERN } from '..';

export default function ({ getPageObject, getService }: FtrProviderContext) {
const elasticChart = getService('elasticChart');
const ml = getService('ml');
const commonScreenshots = getService('commonScreenshots');
const screenshotDirectories = ['ml_docs', 'anomaly_detection'];

describe('finding anomalies', function () {
after(async () => {
await elasticChart.setNewChartUiDebugFlag(false);
await ml.api.cleanMlIndices();
});

it('ecommerce job wizards screenshot', async () => {
await ml.testExecution.logTestStep('navigate to job list');
await ml.navigation.navigateToMl();
await ml.navigation.navigateToJobManagement();

await ml.testExecution.logTestStep('load the wizards');
await ml.jobManagement.navigateToNewJobSourceSelection();
await ml.jobSourceSelection.selectSourceForAnomalyDetectionJob(ECOMMERCE_INDEX_PATTERN);

await ml.testExecution.logTestStep('take screenshot');
await commonScreenshots.removeFocusFromElement();
await commonScreenshots.takeScreenshot('ml-create-job', screenshotDirectories);
});
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ export default function ({ loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./population_analysis'));
loadTestFile(require.resolve('./custom_urls'));
loadTestFile(require.resolve('./mapping_anomalies'));
loadTestFile(require.resolve('./finding_anomalies'));
});
}

0 comments on commit 547b33c

Please sign in to comment.