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

[8.7] [Security Solution] Cover persistent rules table state by e2e tests (#149638) #151875

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

maximpn
Copy link
Contributor

@maximpn maximpn commented Feb 22, 2023

Backport

This will backport the following commits from main to 8.7:

Questions ?

Please refer to the Backport tool documentation

…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)
@maximpn maximpn enabled auto-merge (squash) February 22, 2023 14:51
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Feb 22, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@maximpn maximpn merged commit 3750afa into elastic:8.7 Feb 22, 2023
@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
fleet 929.0KB 929.1KB +69.0B
securitySolution 13.7MB 13.7MB +17.0B
total +86.0B

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants