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/files - FileDeleteButton isIcon clicking delete button opens the confirmation modal #175956

Closed
kibanamachine opened this issue Jan 31, 2024 · 4 comments · Fixed by #176863
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 31, 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-bd62a8627447c22d/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/files/file_delete_button.test.tsx:46:5)
    at _dispatchDescribe (/var/lib/buildkite-agent/builds/kb-n2-4-spot-bd62a8627447c22d/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-bd62a8627447c22d/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/index.js:55:5)
    at describe (/var/lib/buildkite-agent/builds/kb-n2-4-spot-bd62a8627447c22d/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/files/file_delete_button.test.tsx:30:3)
    at _dispatchDescribe (/var/lib/buildkite-agent/builds/kb-n2-4-spot-bd62a8627447c22d/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-bd62a8627447c22d/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-bd62a8627447c22d/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/files/file_delete_button.test.tsx:24:1)
    at Runtime._execModule (/var/lib/buildkite-agent/builds/kb-n2-4-spot-bd62a8627447c22d/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-bd62a8627447c22d/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-bd62a8627447c22d/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-bd62a8627447c22d/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-bd62a8627447c22d/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-bd62a8627447c22d/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 31, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Jan 31, 2024
@kibanamachine kibanamachine added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Jan 31, 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 31, 2024
@cnasikas cnasikas added the Feature:Cases Cases feature label Jan 31, 2024
@elasticmachine
Copy link
Contributor

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

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@mistic
Copy link
Member

mistic commented Jan 31, 2024

Skipped.

main: d3a267e

@cnasikas cnasikas self-assigned this Feb 6, 2024
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this issue Feb 15, 2024
@cnasikas cnasikas added v8.14.0 and removed v8.13.0 labels Feb 20, 2024
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]>
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.

4 participants