[ResponseOps] Fixes embeddable alerts panel flaky test#227390
[ResponseOps] Fixes embeddable alerts panel flaky test#227390cnasikas merged 6 commits intoelastic:mainfrom
Conversation
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#8583[✅] x-pack/platform/test/functional_with_es_ssl/apps/embeddable_alerts_table/config.ts: 200/200 tests passed. |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#8588[❌] x-pack/platform/test/functional_with_es_ssl/apps/embeddable_alerts_table/config.ts: 0/200 tests passed. |
| const retryTimeout = config.get('timeouts.try'); | ||
| const es = getService('es'); | ||
|
|
||
| const createEsQueryRule = async (index: string, solution: 'stack' | 'observability') => { |
There was a problem hiding this comment.
I moved the util functions to the bottom.
| }; | ||
| describe('Embeddable alerts panel', () => { | ||
| before(async () => { | ||
| await sampleData.testResources.installAllKibanaSampleData(); |
There was a problem hiding this comment.
Nice, I didn't know we have sampleData service 😅
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#8620[❌] x-pack/platform/test/functional_with_es_ssl/apps/embeddable_alerts_table/config.ts: 174/200 tests passed. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
cc @cnasikas |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#8634[✅] x-pack/platform/test/functional_with_es_ssl/apps/embeddable_alerts_table/config.ts: 200/200 tests passed. |
|
Starting backport for target branches: 8.19, 9.1 https://github.com/elastic/kibana/actions/runs/16237313252 |
## Summary I changed the code to use API calls to create resources like rules and install the data sample data instead of using the UI. I also fixed a small issue with the time range selector that caused the tests to fail. Fixes: elastic#220807. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 45db4ad)
## Summary I changed the code to use API calls to create resources like rules and install the data sample data instead of using the UI. I also fixed a small issue with the time range selector that caused the tests to fail. Fixes: elastic#220807. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 45db4ad)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#227740) # Backport This will backport the following commits from `main` to `9.1`: - [[ResponseOps] Fixes embeddable alerts panel flaky test (#227390)](#227390) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Christos Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2025-07-12T10:58:39Z","message":"[ResponseOps] Fixes embeddable alerts panel flaky test (#227390)\n\n## Summary\n\nI changed the code to use API calls to create resources like rules and\ninstall the data sample data instead of using the UI. I also fixed a\nsmall issue with the time range selector that caused the tests to fail.\n\nFixes: https://github.com/elastic/kibana/issues/220807.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"45db4add3c3365c9538adf35529577462e5baf6d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[ResponseOps] Fixes embeddable alerts panel flaky test","number":227390,"url":"https://github.com/elastic/kibana/pull/227390","mergeCommit":{"message":"[ResponseOps] Fixes embeddable alerts panel flaky test (#227390)\n\n## Summary\n\nI changed the code to use API calls to create resources like rules and\ninstall the data sample data instead of using the UI. I also fixed a\nsmall issue with the time range selector that caused the tests to fail.\n\nFixes: https://github.com/elastic/kibana/issues/220807.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"45db4add3c3365c9538adf35529577462e5baf6d"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227390","number":227390,"mergeCommit":{"message":"[ResponseOps] Fixes embeddable alerts panel flaky test (#227390)\n\n## Summary\n\nI changed the code to use API calls to create resources like rules and\ninstall the data sample data instead of using the UI. I also fixed a\nsmall issue with the time range selector that caused the tests to fail.\n\nFixes: https://github.com/elastic/kibana/issues/220807.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"45db4add3c3365c9538adf35529577462e5baf6d"}}]}] BACKPORT--> Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
… (#227739) # Backport This will backport the following commits from `main` to `8.19`: - [[ResponseOps] Fixes embeddable alerts panel flaky test (#227390)](#227390) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Christos Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2025-07-12T10:58:39Z","message":"[ResponseOps] Fixes embeddable alerts panel flaky test (#227390)\n\n## Summary\n\nI changed the code to use API calls to create resources like rules and\ninstall the data sample data instead of using the UI. I also fixed a\nsmall issue with the time range selector that caused the tests to fail.\n\nFixes: https://github.com/elastic/kibana/issues/220807.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"45db4add3c3365c9538adf35529577462e5baf6d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[ResponseOps] Fixes embeddable alerts panel flaky test","number":227390,"url":"https://github.com/elastic/kibana/pull/227390","mergeCommit":{"message":"[ResponseOps] Fixes embeddable alerts panel flaky test (#227390)\n\n## Summary\n\nI changed the code to use API calls to create resources like rules and\ninstall the data sample data instead of using the UI. I also fixed a\nsmall issue with the time range selector that caused the tests to fail.\n\nFixes: https://github.com/elastic/kibana/issues/220807.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"45db4add3c3365c9538adf35529577462e5baf6d"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227390","number":227390,"mergeCommit":{"message":"[ResponseOps] Fixes embeddable alerts panel flaky test (#227390)\n\n## Summary\n\nI changed the code to use API calls to create resources like rules and\ninstall the data sample data instead of using the UI. I also fixed a\nsmall issue with the time range selector that caused the tests to fail.\n\nFixes: https://github.com/elastic/kibana/issues/220807.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"45db4add3c3365c9538adf35529577462e5baf6d"}}]}] BACKPORT--> Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
## Summary I changed the code to use API calls to create resources like rules and install the data sample data instead of using the UI. I also fixed a small issue with the time range selector that caused the tests to fail. Fixes: elastic#220807. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
Summary
I changed the code to use API calls to create resources like rules and install the data sample data instead of using the UI. I also fixed a small issue with the time range selector that caused the tests to fail.
Fixes: #220807.
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.