kibana/x-pack/test/functional_with_es_ssl
Kibana Machine 72d429011a
[8.8] [RO] Incorrect Deletion of Webhook Actions in Kibana Rules (#159204) (#159443)
# Backport

This will backport the following commits from `main` to `8.8`:
- [[RO] Incorrect Deletion of Webhook Actions in Kibana Rules
(#159204)](https://github.com/elastic/kibana/pull/159204)

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

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

<!--BACKPORT [{"author":{"name":"Julian
Gernun","email":"17549662+jcger@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-06-12T08:19:20Z","message":"[RO]
Incorrect Deletion of Webhook Actions in Kibana Rules (#159204)\n\n##
Summary\r\n\r\nFixes #158167\r\n\r\nThe issue occurred because we were
using a number called \"index\" as the\r\nReact key prop. When we
removed the first element, the second one took\r\nits place, but React
still showed the removed element.\r\n\r\nTo fix this problem, we found a
solution by using the uuid field that\r\neach action item has. We now
generate it for each new action we create\r\nin the action form and use
that as key\r\n\r\nI was told to add @pmuellr as you might know if we
are missing something\r\n🙇\r\n\r\n### Test: why xpath selector?\r\n\r\nI
had to use the xpath selector to fix a problem we had. The problem
was\r\nbetween two actions we set up. They look the same, but the body
content\r\nis the only different (I've attached a screenshot for more
details).\r\n\r\nWe use a third party component for these actions. This
component doesn't\r\nhave any \"value\" attribute and doesn't add
anything besides the HTML\r\ntext. I tried to find other useful details
but couldn't find any.\r\n\r\nThe problem comes up when we try to delete
one of the actions. To fix\r\nit, we needed to check if that component
was missing. We already have\r\ntools that can look for missing
components, but they don't work with the\r\nxpath selector. So, I added
a new function that can do this. Now, we can\r\nuse the xpath selector
to look for missing components and fix the\r\nproblem\r\n
\r\n<details>\r\n<summary>See
Screenshot</summary>\r\n<img\r\nsrc=\"5447795d-0281-4847-aa85-76d0e5fdec3d\"/>\r\n</details>\r\n\r\n```[tasklist]\r\n-
[x] Make sure that it's ok to generate the uuid\r\n- [x] Test\r\n- [x]
Do we need to backport?
Versions?\r\n```","sha":"55bc8cf567a437581d37e6e7d1380216667f34cd","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","v8.8.0","v8.9.0"],"number":159204,"url":"https://github.com/elastic/kibana/pull/159204","mergeCommit":{"message":"[RO]
Incorrect Deletion of Webhook Actions in Kibana Rules (#159204)\n\n##
Summary\r\n\r\nFixes #158167\r\n\r\nThe issue occurred because we were
using a number called \"index\" as the\r\nReact key prop. When we
removed the first element, the second one took\r\nits place, but React
still showed the removed element.\r\n\r\nTo fix this problem, we found a
solution by using the uuid field that\r\neach action item has. We now
generate it for each new action we create\r\nin the action form and use
that as key\r\n\r\nI was told to add @pmuellr as you might know if we
are missing something\r\n🙇\r\n\r\n### Test: why xpath selector?\r\n\r\nI
had to use the xpath selector to fix a problem we had. The problem
was\r\nbetween two actions we set up. They look the same, but the body
content\r\nis the only different (I've attached a screenshot for more
details).\r\n\r\nWe use a third party component for these actions. This
component doesn't\r\nhave any \"value\" attribute and doesn't add
anything besides the HTML\r\ntext. I tried to find other useful details
but couldn't find any.\r\n\r\nThe problem comes up when we try to delete
one of the actions. To fix\r\nit, we needed to check if that component
was missing. We already have\r\ntools that can look for missing
components, but they don't work with the\r\nxpath selector. So, I added
a new function that can do this. Now, we can\r\nuse the xpath selector
to look for missing components and fix the\r\nproblem\r\n
\r\n<details>\r\n<summary>See
Screenshot</summary>\r\n<img\r\nsrc=\"5447795d-0281-4847-aa85-76d0e5fdec3d\"/>\r\n</details>\r\n\r\n```[tasklist]\r\n-
[x] Make sure that it's ok to generate the uuid\r\n- [x] Test\r\n- [x]
Do we need to backport?
Versions?\r\n```","sha":"55bc8cf567a437581d37e6e7d1380216667f34cd"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159204","number":159204,"mergeCommit":{"message":"[RO]
Incorrect Deletion of Webhook Actions in Kibana Rules (#159204)\n\n##
Summary\r\n\r\nFixes #158167\r\n\r\nThe issue occurred because we were
using a number called \"index\" as the\r\nReact key prop. When we
removed the first element, the second one took\r\nits place, but React
still showed the removed element.\r\n\r\nTo fix this problem, we found a
solution by using the uuid field that\r\neach action item has. We now
generate it for each new action we create\r\nin the action form and use
that as key\r\n\r\nI was told to add @pmuellr as you might know if we
are missing something\r\n🙇\r\n\r\n### Test: why xpath selector?\r\n\r\nI
had to use the xpath selector to fix a problem we had. The problem
was\r\nbetween two actions we set up. They look the same, but the body
content\r\nis the only different (I've attached a screenshot for more
details).\r\n\r\nWe use a third party component for these actions. This
component doesn't\r\nhave any \"value\" attribute and doesn't add
anything besides the HTML\r\ntext. I tried to find other useful details
but couldn't find any.\r\n\r\nThe problem comes up when we try to delete
one of the actions. To fix\r\nit, we needed to check if that component
was missing. We already have\r\ntools that can look for missing
components, but they don't work with the\r\nxpath selector. So, I added
a new function that can do this. Now, we can\r\nuse the xpath selector
to look for missing components and fix the\r\nproblem\r\n
\r\n<details>\r\n<summary>See
Screenshot</summary>\r\n<img\r\nsrc=\"5447795d-0281-4847-aa85-76d0e5fdec3d\"/>\r\n</details>\r\n\r\n```[tasklist]\r\n-
[x] Make sure that it's ok to generate the uuid\r\n- [x] Test\r\n- [x]
Do we need to backport?
Versions?\r\n```","sha":"55bc8cf567a437581d37e6e7d1380216667f34cd"}}]}]
BACKPORT-->

Co-authored-by: Julian Gernun <17549662+jcger@users.noreply.github.com>
2023-06-12 03:06:47 -07:00
..
apps [8.8] [RO] Incorrect Deletion of Webhook Actions in Kibana Rules (#159204) (#159443) 2023-06-12 03:06:47 -07:00
lib [8.8] [ResponseOps][Maintenance Window] Add and improve E2E tests for the maintenance window table (#156611) (#156853) 2023-05-05 07:52:38 -07:00
page_objects [ResponseOps][Stack Connectors] Opsgenie connector UI (#142411) 2022-10-18 12:54:37 -07:00
plugins Make rule type param validation required (#154257) 2023-04-20 19:23:47 +02:00
config.base.ts [8.8] [ResponseOps][Maintenance Window] Add and improve E2E tests for the maintenance window table (#156611) (#156853) 2023-05-05 07:52:38 -07:00
ftr_provider_context.d.ts [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00