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/components - EditTags renders no tags, and then edit #175655

Closed
kibanamachine opened this issue Jan 26, 2024 · 10 comments · Fixed by #175763, #176863 or #186295
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 Jan 26, 2024

A test failed on a tracked branch

Error: thrown: "Exceeded timeout of 5000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
    at it (/var/lib/buildkite-agent/builds/kb-n2-4-spot-81f1fb3cd7b73155/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/case_view/components/edit_tags.test.tsx:44:3)
    at _dispatchDescribe (/var/lib/buildkite-agent/builds/kb-n2-4-spot-81f1fb3cd7b73155/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/index.js:91:26)
    at describe (/var/lib/buildkite-agent/builds/kb-n2-4-spot-81f1fb3cd7b73155/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/index.js:55:5)
    at Object.describe (/var/lib/buildkite-agent/builds/kb-n2-4-spot-81f1fb3cd7b73155/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/case_view/components/edit_tags.test.tsx:28:1)
    at Runtime._execModule (/var/lib/buildkite-agent/builds/kb-n2-4-spot-81f1fb3cd7b73155/elastic/kibana-on-merge/kibana/node_modules/jest-runtime/build/index.js:1430:24)
    at Runtime._loadModule (/var/lib/buildkite-agent/builds/kb-n2-4-spot-81f1fb3cd7b73155/elastic/kibana-on-merge/kibana/node_modules/jest-runtime/build/index.js:1013:12)
    at Runtime.requireModule (/var/lib/buildkite-agent/builds/kb-n2-4-spot-81f1fb3cd7b73155/elastic/kibana-on-merge/kibana/node_modules/jest-runtime/build/index.js:873:12)
    at jestAdapter (/var/lib/buildkite-agent/builds/kb-n2-4-spot-81f1fb3cd7b73155/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)
    at runTestInternal (/var/lib/buildkite-agent/builds/kb-n2-4-spot-81f1fb3cd7b73155/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-81f1fb3cd7b73155/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 26, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Jan 26, 2024
@kibanamachine kibanamachine added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Jan 26, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 26, 2024
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@mistic
Copy link
Member

mistic commented Jan 26, 2024

Skipped.

main: bb3abc7

@cnasikas cnasikas added the Feature:Cases Cases feature label Jan 28, 2024
@elasticmachine
Copy link
Contributor

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

@cnasikas cnasikas self-assigned this Jan 29, 2024
cnasikas added a commit that referenced this issue Jan 29, 2024
## Summary

Fixes: #175655,
#175623,
#175622,
#175619,
#175618

### 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 kibanamachine reopened this Feb 1, 2024
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

mistic added a commit that referenced this issue Feb 9, 2024
@mistic
Copy link
Member

mistic commented Feb 9, 2024

Skipped.

main: 3503a11

fkanout pushed a commit to fkanout/kibana that referenced this issue Mar 4, 2024
## Summary

Fixes: elastic#175655,
elastic#175623,
elastic#175622,
elastic#175619,
elastic#175618

### 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)
fkanout pushed a commit to fkanout/kibana that referenced this issue Mar 4, 2024
fkanout pushed a commit to fkanout/kibana that referenced this issue Mar 4, 2024
## Summary

With the help of @umbopepato, @js-jankisalvi, and @adcoelho, we realized
that one possible source of flakiness is the `CasesContextProvider` that
every test uses under the hood. In this PR I refactor the
`CasesContextProvider` to render immediately its children and not wait
for the `appId` and `appTitle` to be defined. I make them optional and
make all changes needed in the code to accommodate the presence of an
optional `appId`. Also, I refactored some components that I believed
could introduce flakiness.

## Issues

Fixes elastic#175570
Fixes elastic#175956
Fixes elastic#175935
Fixes elastic#175934
Fixes elastic#175655
Fixes elastic#176643
Fixes elastic#175204

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5255,
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5261,
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5264,
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5267

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

### 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: Umberto Pepato <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
@kibanamachine kibanamachine reopened this Mar 11, 2024
@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 22, 2024

Skipped.

main: ee9c021

@cnasikas cnasikas removed their assignment Apr 21, 2024
@cnasikas cnasikas added v8.15.0 and removed v8.14.0 labels May 15, 2024
adcoelho added a commit that referenced this issue Jun 18, 2024
Fixes [#175655](#175655)

## Summary

The other tests already tested the edit button so I changed the scope to
look only for the `no tags` message.
@adcoelho adcoelho self-assigned this Jun 18, 2024
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