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/all_cases - AllCasesListGeneric Actions Row actions should disable row actions when selecting a case #148096

Closed
kibanamachine opened this issue Dec 26, 2022 · 6 comments · Fixed by #157285
Assignees
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 Dec 26, 2022

A test failed on a tracked branch

TestingLibraryElementError: Unable to find an element by: [data-test-subj="checkboxSelectRow-basic-case-id"]

Ignored nodes: comments, script, style
<body
  class=""
>
  <div />
</body>
    at Object.getElementError (/var/lib/buildkite-agent/builds/kb-n2-4-spot-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx:1010:31)
    at batchedUpdates$1 (/var/lib/buildkite-agent/builds/kb-n2-4-spot-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx:1009:12)
    at Promise.then.completed (/var/lib/buildkite-agent/builds/kb-n2-4-spot-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/run.js:248:40)
    at runMicrotasks (<anonymous>)
    at runNextTicks (node:internal/process/task_queues:61:5)
    at listOnTimeout (node:internal/timers:528:9)
    at processTimers (node:internal/timers:502:7)
    at _runTest (/var/lib/buildkite-agent/builds/kb-n2-4-spot-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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-1154c761d1f6f4cb/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 Dec 26, 2022
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 26, 2022
@kibanamachine kibanamachine added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Dec 26, 2022
@elasticmachine
Copy link
Contributor

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

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

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

js-jankisalvi added a commit that referenced this issue Feb 10, 2023
## Summary

This PR fixes failed jest tests for `all_cases_list ` component. 
Fixes: #139676, #142763, #148094, #148095, #148096, #148485, #148486,
#148487, #148488, #148490, #148491, #148492, #148493, #148343

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@cnasikas
Copy link
Member

Fixed by #149005

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@spalger
Copy link
Contributor

spalger commented Feb 10, 2023

I'm sorry @js-jankisalvi but this failure occurred just minutes after the tests were unskipped by #149005

Skipped when dealing with #150923

cnasikas added a commit that referenced this issue May 15, 2023
## Summary

This PR fixes the flaky tests in
`x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx`.
It modifies the `getComputedStyle` to be more performant. For more
information see
https://blog.sentry.io/sentrys-frontend-tests-migrating-from-enzyme-to-react-testing-library
and jsdom/jsdom#3234.

I run the test multiple times on CI to ensure that the test is not flaky
anymore: Specifically:

- Test run 50 times in
ccf2716
- Test run 40 times in
c56c650
- Test run 50 times in
b04d613
- Test run 50 times in
e0ef292
- Test run 55 times in
1ba6bac

Fixes: #148096,
#150923

### 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)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
jasonrhodes pushed a commit that referenced this issue May 17, 2023
## Summary

This PR fixes the flaky tests in
`x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx`.
It modifies the `getComputedStyle` to be more performant. For more
information see
https://blog.sentry.io/sentrys-frontend-tests-migrating-from-enzyme-to-react-testing-library
and jsdom/jsdom#3234.

I run the test multiple times on CI to ensure that the test is not flaky
anymore: Specifically:

- Test run 50 times in
ccf2716
- Test run 40 times in
c56c650
- Test run 50 times in
b04d613
- Test run 50 times in
e0ef292
- Test run 55 times in
1ba6bac

Fixes: #148096,
#150923

### 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)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine reopened this Dec 12, 2023
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 8.12

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
Development

Successfully merging a pull request may close this issue.

5 participants