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

[Cases] Fix jira_params.test.tsx flaky test #141574

Merged
merged 3 commits into from
Sep 23, 2022
Merged

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Sep 23, 2022

Summary

This is an attempt to fix the flakiness of the x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/jira_params.test.tsx flaky test.

I did the following:

  • Convert the test to react testing library
  • Surround all actions with an act
  • waitFor when needed
  • Mock hooks that make API calls

I run the test locally 1000 times without issues.

Context: #139062

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cnasikas cnasikas added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature v8.6.0 labels Sep 23, 2022
@cnasikas cnasikas self-assigned this Sep 23, 2022
@cnasikas cnasikas requested a review from a team as a code owner September 23, 2022 08:28
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@@ -196,191 +196,188 @@ const JiraParamsFields: React.FunctionComponent<ActionParamsProps<JiraActionPara

return (
<>
<EuiFormRow
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not as bad as it looks. I remove an extra <></>. Please review with "Hide whitespace" enabled.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
triggersActionsUi 1.1MB 1.1MB -1.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @cnasikas

@cnasikas cnasikas added backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) v8.5.0 and removed backport:skip This commit does not require backporting labels Sep 23, 2022
@cnasikas cnasikas merged commit 4c16e62 into elastic:main Sep 23, 2022
@cnasikas cnasikas deleted the fix_139062 branch September 23, 2022 13:26
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 23, 2022
* Fix flaky test

* Fix typo

(cherry picked from commit 4c16e62)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.5

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 23, 2022
* Fix flaky test

* Fix typo

(cherry picked from commit 4c16e62)

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
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.5.0 v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants