-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Cover persistent rules table state by e2e tests #149638
[Security Solution] Cover persistent rules table state by e2e tests #149638
Conversation
0749fd8
to
06c8cec
Compare
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pinging @elastic/fleet (Team:Fleet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fleet changes LGTM!
664c228
to
e2d509b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good on explore
5ced520
to
6255256
Compare
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @maximpn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Investigations changes! 👍🏾 nice work!
…lastic#149638) **Relates to:** elastic#140263 ## Summary This PR adds Cypress e2e tests to cover persistent rules table state functionality. ## Details It implements a test plan for the persistent rules table state functionality and includes some improvements to the other e2e tests to facilitate writing tests - `visit()` helper function input parameters were changed to match `cy.visit()`. It allows to pass a query string via `qs` and use the other fields. - added a skip agent installation step in `installAwsCloudFrontWithPolicy ` used in `detection_rules/related_integrations.cy.ts`. The agent installation screen started appearing after changes to the `visit()` helper function. It looks like a bug since url `app/integrations/detail/aws-1.17.0/overview?integration=cloudfront` was concatenated with `timeline=...` query string inside `visit()` and `cy.visit()` finally invoked with `app/integrations/detail/aws-1.17.0/overview?integration=cloudfront?timeline=...`. Fixing that cause test to fail due to agent installation screen. - use default type delay for `NOTES_TEXT_AREA` in `timelines/creation.cy.ts`. It looks that zero typing delay caused test flakiness. - selectors and helper functions were reorganized to facilitate its usage. ### Checklist - [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 (cherry picked from commit 513a1f0)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ests (#149638) (#151875) # Backport This will backport the following commits from `main` to `8.7`: - [[Security Solution] Cover persistent rules table state by e2e tests (#149638)](#149638) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2023-02-22T13:46:50Z","message":"[Security Solution] Cover persistent rules table state by e2e tests (#149638)\n\n**Relates to:** https://github.com/elastic/kibana/issues/140263\r\n\r\n## Summary\r\n\r\nThis PR adds Cypress e2e tests to cover persistent rules table state functionality.\r\n\r\n## Details\r\n\r\nIt implements a test plan for the persistent rules table state functionality and includes some improvements to the other e2e tests to facilitate writing tests\r\n\r\n- `visit()` helper function input parameters were changed to match `cy.visit()`. It allows to pass a query string via `qs` and use the other fields.\r\n- added a skip agent installation step in `installAwsCloudFrontWithPolicy ` used in `detection_rules/related_integrations.cy.ts`. The agent installation screen started appearing after changes to the `visit()` helper function. It looks like a bug since url `app/integrations/detail/aws-1.17.0/overview?integration=cloudfront` was concatenated with `timeline=...` query string inside `visit()` and `cy.visit()` finally invoked with `app/integrations/detail/aws-1.17.0/overview?integration=cloudfront?timeline=...`. Fixing that cause test to fail due to agent installation screen.\r\n- use default type delay for `NOTES_TEXT_AREA` in `timelines/creation.cy.ts`. It looks that zero typing delay caused test flakiness.\r\n- selectors and helper functions were reorganized to facilitate its usage.\r\n\r\n### Checklist\r\n\r\n- [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","sha":"513a1f0538b4c3641e87d6665790e8daaa3bb985","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:Fleet","Feature:Detection Rules","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rules","v8.8.0"],"number":149638,"url":"https://github.com/elastic/kibana/pull/149638","mergeCommit":{"message":"[Security Solution] Cover persistent rules table state by e2e tests (#149638)\n\n**Relates to:** https://github.com/elastic/kibana/issues/140263\r\n\r\n## Summary\r\n\r\nThis PR adds Cypress e2e tests to cover persistent rules table state functionality.\r\n\r\n## Details\r\n\r\nIt implements a test plan for the persistent rules table state functionality and includes some improvements to the other e2e tests to facilitate writing tests\r\n\r\n- `visit()` helper function input parameters were changed to match `cy.visit()`. It allows to pass a query string via `qs` and use the other fields.\r\n- added a skip agent installation step in `installAwsCloudFrontWithPolicy ` used in `detection_rules/related_integrations.cy.ts`. The agent installation screen started appearing after changes to the `visit()` helper function. It looks like a bug since url `app/integrations/detail/aws-1.17.0/overview?integration=cloudfront` was concatenated with `timeline=...` query string inside `visit()` and `cy.visit()` finally invoked with `app/integrations/detail/aws-1.17.0/overview?integration=cloudfront?timeline=...`. Fixing that cause test to fail due to agent installation screen.\r\n- use default type delay for `NOTES_TEXT_AREA` in `timelines/creation.cy.ts`. It looks that zero typing delay caused test flakiness.\r\n- selectors and helper functions were reorganized to facilitate its usage.\r\n\r\n### Checklist\r\n\r\n- [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","sha":"513a1f0538b4c3641e87d6665790e8daaa3bb985"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/149638","number":149638,"mergeCommit":{"message":"[Security Solution] Cover persistent rules table state by e2e tests (#149638)\n\n**Relates to:** https://github.com/elastic/kibana/issues/140263\r\n\r\n## Summary\r\n\r\nThis PR adds Cypress e2e tests to cover persistent rules table state functionality.\r\n\r\n## Details\r\n\r\nIt implements a test plan for the persistent rules table state functionality and includes some improvements to the other e2e tests to facilitate writing tests\r\n\r\n- `visit()` helper function input parameters were changed to match `cy.visit()`. It allows to pass a query string via `qs` and use the other fields.\r\n- added a skip agent installation step in `installAwsCloudFrontWithPolicy ` used in `detection_rules/related_integrations.cy.ts`. The agent installation screen started appearing after changes to the `visit()` helper function. It looks like a bug since url `app/integrations/detail/aws-1.17.0/overview?integration=cloudfront` was concatenated with `timeline=...` query string inside `visit()` and `cy.visit()` finally invoked with `app/integrations/detail/aws-1.17.0/overview?integration=cloudfront?timeline=...`. Fixing that cause test to fail due to agent installation screen.\r\n- use default type delay for `NOTES_TEXT_AREA` in `timelines/creation.cy.ts`. It looks that zero typing delay caused test flakiness.\r\n- selectors and helper functions were reorganized to facilitate its usage.\r\n\r\n### Checklist\r\n\r\n- [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","sha":"513a1f0538b4c3641e87d6665790e8daaa3bb985"}}]}] BACKPORT-->
Relates to: #140263
Summary
This PR adds Cypress e2e tests to cover persistent rules table state functionality.
Details
It implements a test plan for the persistent rules table state functionality and includes some improvements to the other e2e tests to facilitate writing tests
visit()
helper function input parameters were changed to matchcy.visit()
. It allows to pass a query string viaqs
and use the other fields.installAwsCloudFrontWithPolicy
used indetection_rules/related_integrations.cy.ts
. The agent installation screen started appearing after changes to thevisit()
helper function. It looks like a bug since urlapp/integrations/detail/aws-1.17.0/overview?integration=cloudfront
was concatenated withtimeline=...
query string insidevisit()
andcy.visit()
finally invoked withapp/integrations/detail/aws-1.17.0/overview?integration=cloudfront?timeline=...
. Fixing that cause test to fail due to agent installation screen.NOTES_TEXT_AREA
intimelines/creation.cy.ts
. It looks that zero typing delay caused test flakiness.Checklist