[8.11] [ML] AIOps: Fix flaky change point detection test (#168512) (#168535)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] AIOps: Fix flaky change point detection test
(#168512)](https://github.com/elastic/kibana/pull/168512)

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

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

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2023-10-10T20:36:50Z","message":"[ML]
AIOps: Fix flaky change point detection test (#168512)\n\n##
Summary\r\n\r\nCloses #160986\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"e52e6ee92fe06f5d3b12e7f6bd400f636537a437","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","test_ui_functional","release_note:skip","Team:ML","Feature:ML/AIOps","v8.11.0","v8.12.0"],"number":168512,"url":"https://github.com/elastic/kibana/pull/168512","mergeCommit":{"message":"[ML]
AIOps: Fix flaky change point detection test (#168512)\n\n##
Summary\r\n\r\nCloses #160986\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"e52e6ee92fe06f5d3b12e7f6bd400f636537a437"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168512","number":168512,"mergeCommit":{"message":"[ML]
AIOps: Fix flaky change point detection test (#168512)\n\n##
Summary\r\n\r\nCloses #160986\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"e52e6ee92fe06f5d3b12e7f6bd400f636537a437"}}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
This commit is contained in:
Kibana Machine 2023-10-10 19:20:49 -04:00 committed by GitHub
parent 6d11f1296a
commit 64cebffabf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,8 +16,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
// aiops lives in the ML UI so we need some related services.
const ml = getService('ml');
// Failing: See https://github.com/elastic/kibana/issues/160986
describe.skip('change point detection', async function () {
describe('change point detection', async function () {
before(async () => {
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/ecommerce');
await ml.testResources.createIndexPatternIfNeeded('ft_ecommerce', 'order_date');
@ -85,6 +84,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await aiops.changePointDetectionPage
.getTable(0)
.invokeAction(0, 'aiopsChangePointFilterForValue');
await aiops.changePointDetectionPage.getTable(0).waitForTableToLoad();
const resultFor = await aiops.changePointDetectionPage.getTable(0).parseTable();
expect(resultFor.length).to.eql(1);
});