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

Failing test: Jest Tests.x-pack/plugins/cases/public/components/case_view - CaseViewPage Tabs renders the alerts tab when the query parameter tabId has alerts #149775

Closed
kibanamachine opened this issue Jan 27, 2023 · 6 comments · Fixed by #160412
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Jan 27, 2023

A test failed on a tracked branch

TestingLibraryElementError: Unable to find an element by: [data-test-subj="case-view-tab-content-alerts"]

Ignored nodes: comments, script, style
<body>
  <div />
</body>
    at Object.getElementError (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/@testing-library/dom/dist/config.js:40:19)
    at /var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/@testing-library/dom/dist/query-helpers.js:90:38
    at /var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/@testing-library/dom/dist/query-helpers.js:62:17
    at /var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/@testing-library/dom/dist/query-helpers.js:111:19
    at getByTestId (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx:488:23)
    at batchedUpdates$1 (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/react-dom/cjs/react-dom.development.js:22380:12)
    at act (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/react-dom/cjs/react-dom-test-utils.development.js:1042:14)
    at Object.<anonymous> (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx:487:16)
    at Promise.then.completed (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/utils.js:289:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/utils.js:222:10)
    at _callCircusTest (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/run.js:248:40)
    at runNextTicks (node:internal/process/task_queues:61:5)
    at processTimers (node:internal/timers:499:9)
    at _runTest (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/run.js:184:3)
    at _runTestsForDescribeBlock (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/run.js:86:9)
    at _runTestsForDescribeBlock (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/run.js:81:9)
    at _runTestsForDescribeBlock (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/run.js:81:9)
    at run (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/run.js:26:3)
    at runAndTransformResultsToJestFormat (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:120:21)
    at jestAdapter (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
    at runTestInternal (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/var/lib/buildkite-agent/builds/kb-n2-4-spot-3f2434e6d3ddd216/elastic/kibana-on-merge/kibana/node_modules/jest-runner/build/runTest.js:444:34)

First failure: CI Build - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Jan 27, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Jan 27, 2023
@kibanamachine kibanamachine added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Jan 27, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 27, 2023
@cnasikas cnasikas added the Feature:Cases Cases feature label Jan 30, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@mistic
Copy link
Member

mistic commented Mar 21, 2023

Skipped.

main: f4d8b10

@jonathan-buttner jonathan-buttner removed their assignment Apr 24, 2023
cnasikas added a commit that referenced this issue Jun 27, 2023
## Summary

This PR fixes flaky tests in
`x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx`.
Some of them were converted to an e2e test as they were too slow to be
on a unit test.

Successful runs: 

-
a4ed839
(50 times)
-
82ccceb
(45 times)
-
43c47e6
(20 times)

Fixes: #149775,
#149776,
#149777,
#149778,
#149779,
#149780,
#149781,
#149782,
#153335,
#153336,
#149773,
#149774,
#149772,
#149771,
#149770,
#149769,
#151845,
#153336,
#153335

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500

### Checklist

Delete any items that are not applicable to this PR.

- [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

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jun 27, 2023
## Summary

This PR fixes flaky tests in
`x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx`.
Some of them were converted to an e2e test as they were too slow to be
on a unit test.

Successful runs:

-
elastic@a4ed839
(50 times)
-
elastic@82ccceb
(45 times)
-
elastic@43c47e6
(20 times)

Fixes: elastic#149775,
elastic#149776,
elastic#149777,
elastic#149778,
elastic#149779,
elastic#149780,
elastic#149781,
elastic#149782,
elastic#153335,
elastic#153336,
elastic#149773,
elastic#149774,
elastic#149772,
elastic#149771,
elastic#149770,
elastic#149769,
elastic#151845,
elastic#153336,
elastic#153335

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500

### Checklist

Delete any items that are not applicable to this PR.

- [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

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit c0047a1)
kibanamachine referenced this issue Jun 27, 2023
# Backport

This will backport the following commits from `main` to `8.9`:
- [[Cases] Fix case view flaky tests
(#160412)](#160412)

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

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

<!--BACKPORT [{"author":{"name":"Christos
Nasikas","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-27T13:57:30Z","message":"[Cases]
Fix case view flaky tests (#160412)\n\n## Summary\r\n\r\nThis PR fixes
flaky tests
in\r\n`x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx`.\r\nSome
of them were converted to an e2e test as they were too slow to be\r\non
a unit test.\r\n\r\nSuccessful runs:
\r\n\r\n-\r\nhttps://github.com//pull/160412/commits/a4ed8390d45b628ee4328c3655164c94449e3dc8\r\n(50
times)\r\n-\r\nhttps://github.com//pull/160412/commits/82ccceb03aff6f74cd30f80fcaaa0f2b99c28103\r\n(45
times)\r\n-\r\nhttps://github.com//pull/160412/commits/43c47e645b26561c00de97e8a4d965b435a5491b\r\n(20
times)\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/149775,\r\nhttps://github.com/elastic/kibana/issues/149776,\r\nhttps://github.com/elastic/kibana/issues/149777,\r\nhttps://github.com/elastic/kibana/issues/149778,\r\nhttps://github.com/elastic/kibana/issues/149779,\r\nhttps://github.com/elastic/kibana/issues/149780,\r\nhttps://github.com/elastic/kibana/issues/149781,\r\nhttps://github.com/elastic/kibana/issues/149782,\r\nhttps://github.com/elastic/kibana/issues/153335,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/149773,\r\nhttps://github.com/elastic/kibana/issues/149774,\r\nhttps://github.com/elastic/kibana/issues/149772,\r\nhttps://github.com/elastic/kibana/issues/149771,\r\nhttps://github.com/elastic/kibana/issues/149770,\r\nhttps://github.com/elastic/kibana/issues/149769,\r\nhttps://github.com/elastic/kibana/issues/151845,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/153335\r\n\r\nFlaky
test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500\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":"c0047a1b94d898a16e4a5aad94663f07b5b06e52","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","v8.9.0","v8.10.0"],"number":160412,"url":"https://github.com/elastic/kibana/pull/160412","mergeCommit":{"message":"[Cases]
Fix case view flaky tests (#160412)\n\n## Summary\r\n\r\nThis PR fixes
flaky tests
in\r\n`x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx`.\r\nSome
of them were converted to an e2e test as they were too slow to be\r\non
a unit test.\r\n\r\nSuccessful runs:
\r\n\r\n-\r\nhttps://github.com//pull/160412/commits/a4ed8390d45b628ee4328c3655164c94449e3dc8\r\n(50
times)\r\n-\r\nhttps://github.com//pull/160412/commits/82ccceb03aff6f74cd30f80fcaaa0f2b99c28103\r\n(45
times)\r\n-\r\nhttps://github.com//pull/160412/commits/43c47e645b26561c00de97e8a4d965b435a5491b\r\n(20
times)\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/149775,\r\nhttps://github.com/elastic/kibana/issues/149776,\r\nhttps://github.com/elastic/kibana/issues/149777,\r\nhttps://github.com/elastic/kibana/issues/149778,\r\nhttps://github.com/elastic/kibana/issues/149779,\r\nhttps://github.com/elastic/kibana/issues/149780,\r\nhttps://github.com/elastic/kibana/issues/149781,\r\nhttps://github.com/elastic/kibana/issues/149782,\r\nhttps://github.com/elastic/kibana/issues/153335,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/149773,\r\nhttps://github.com/elastic/kibana/issues/149774,\r\nhttps://github.com/elastic/kibana/issues/149772,\r\nhttps://github.com/elastic/kibana/issues/149771,\r\nhttps://github.com/elastic/kibana/issues/149770,\r\nhttps://github.com/elastic/kibana/issues/149769,\r\nhttps://github.com/elastic/kibana/issues/151845,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/153335\r\n\r\nFlaky
test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500\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":"c0047a1b94d898a16e4a5aad94663f07b5b06e52"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160412","number":160412,"mergeCommit":{"message":"[Cases]
Fix case view flaky tests (#160412)\n\n## Summary\r\n\r\nThis PR fixes
flaky tests
in\r\n`x-pack/plugins/cases/public/components/case_view/case_view_page.test.tsx`.\r\nSome
of them were converted to an e2e test as they were too slow to be\r\non
a unit test.\r\n\r\nSuccessful runs:
\r\n\r\n-\r\nhttps://github.com//pull/160412/commits/a4ed8390d45b628ee4328c3655164c94449e3dc8\r\n(50
times)\r\n-\r\nhttps://github.com//pull/160412/commits/82ccceb03aff6f74cd30f80fcaaa0f2b99c28103\r\n(45
times)\r\n-\r\nhttps://github.com//pull/160412/commits/43c47e645b26561c00de97e8a4d965b435a5491b\r\n(20
times)\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/149775,\r\nhttps://github.com/elastic/kibana/issues/149776,\r\nhttps://github.com/elastic/kibana/issues/149777,\r\nhttps://github.com/elastic/kibana/issues/149778,\r\nhttps://github.com/elastic/kibana/issues/149779,\r\nhttps://github.com/elastic/kibana/issues/149780,\r\nhttps://github.com/elastic/kibana/issues/149781,\r\nhttps://github.com/elastic/kibana/issues/149782,\r\nhttps://github.com/elastic/kibana/issues/153335,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/149773,\r\nhttps://github.com/elastic/kibana/issues/149774,\r\nhttps://github.com/elastic/kibana/issues/149772,\r\nhttps://github.com/elastic/kibana/issues/149771,\r\nhttps://github.com/elastic/kibana/issues/149770,\r\nhttps://github.com/elastic/kibana/issues/149769,\r\nhttps://github.com/elastic/kibana/issues/151845,\r\nhttps://github.com/elastic/kibana/issues/153336,\r\nhttps://github.com/elastic/kibana/issues/153335\r\n\r\nFlaky
test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2500\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":"c0047a1b94d898a16e4a5aad94663f07b5b06e52"}}]}]
BACKPORT-->

Co-authored-by: Christos Nasikas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
5 participants