[8.6] [Cases] Fix flaky test in user actions (#145725) (#145848)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[Cases] Fix flaky test in user actions
(#145725)](https://github.com/elastic/kibana/pull/145725)

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

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

<!--BACKPORT [{"author":{"name":"Christos
Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2022-11-21T11:57:31Z","message":"[Cases]
Fix flaky test in user actions (#145725)\n\n## Summary\r\n\r\nThis PR un
skips and fix a flaky test in user actions\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/144660\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\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\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"5c15658756aefc85ce87c5326f97c85c3e5845b8","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","v8.6.0","v8.7.0"],"number":145725,"url":"https://github.com/elastic/kibana/pull/145725","mergeCommit":{"message":"[Cases]
Fix flaky test in user actions (#145725)\n\n## Summary\r\n\r\nThis PR un
skips and fix a flaky test in user actions\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/144660\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\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\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"5c15658756aefc85ce87c5326f97c85c3e5845b8"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145725","number":145725,"mergeCommit":{"message":"[Cases]
Fix flaky test in user actions (#145725)\n\n## Summary\r\n\r\nThis PR un
skips and fix a flaky test in user actions\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/144660\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\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\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"5c15658756aefc85ce87c5326f97c85c3e5845b8"}}]}]
BACKPORT-->

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
This commit is contained in:
Kibana Machine 2022-11-21 07:55:18 -05:00 committed by GitHub
parent 8d29d1d65a
commit 7215c33aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,8 +23,7 @@ import {
jest.mock('../../containers/api');
// FLAKY: https://github.com/elastic/kibana/issues/144660
describe.skip('useActions', () => {
describe('useActions', () => {
let appMockRender: AppMockRenderer;
beforeEach(() => {
@ -97,7 +96,9 @@ describe.skip('useActions', () => {
});
act(() => {
userEvent.click(res.getByTestId(`case-action-status-panel-${basicCase.id}`));
userEvent.click(res.getByTestId(`case-action-status-panel-${basicCase.id}`), undefined, {
skipPointerEventsCheck: true,
});
});
await waitFor(() => {