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

[SIEM] Adds 'Load prebuilt rules' Cypress test #59529

Merged
merged 3 commits into from
Mar 6, 2020

Conversation

MadameSheema
Copy link
Member

@MadameSheema MadameSheema commented Mar 6, 2020

Summary

In this PR we are adding a Cypress test in order to check that the prebuilt Elastic rules are correctly loaded.

In order to do that the test is performing the following actions:

signal_detection_rules spec ts

  1. Open detections page
  2. Wait for the signals index to be created since if we not wait for it we can experience a flaky behaviour.
  3. Go to to manage signal detect rules clicking in the button
  4. Load the prebuilt detection rules clicking in the button placed in the middle of the screen.
  5. Checks that the text displayed in the prebuilt rules button is: 'Elastic rules (92)'
  6. Changes the number of rules displayed to 300.
  7. Checks that there are 92 rules displayed in the screen.

Note that this test has been written thinking that is going to be executed using the CI mode using the data prepared for the test using es_archiver, if you want to execute it in a different environment, the rules should not be previously loaded.

@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

Copy link
Contributor

@yctercero yctercero left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! Would this also be a good place to test the filter/search in All rules page?

@MadameSheema
Copy link
Member Author

@yctercero if we cannot cover that behaviour with jest, we can add a new test in Cypress :)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

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

Thanks for adding the first set! LGTM

@MadameSheema MadameSheema merged commit 9ab4aa0 into elastic:master Mar 6, 2020
@MadameSheema MadameSheema deleted the load-prebuilt-rules branch March 6, 2020 21:41
MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Mar 6, 2020
* adds 'load prebuilt rules'

* fixes typecheck issue

* updates jest snapshot
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 7, 2020
MadameSheema added a commit to MadameSheema/kibana that referenced this pull request Mar 8, 2020
* adds 'load prebuilt rules'

* fixes typecheck issue

* updates jest snapshot
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 9, 2020
* master: (154 commits)
  Add an optional authentication mode for HTTP resources (elastic#58589)
  Implement embeddable drilldown menu options (elastic#59232)
  [Alerting] "Create alert" graph visualization design improvements (elastic#59399)
  Alerting update route throttle property is missing (elastic#59580)
  [SIEM] Adds 'Load prebuilt rules' Cypress test (elastic#59529)
  Show error if field is not found during filter rendering (elastic#59298)
  Navigate back to discover app during test, because the saved search from the preceding test has major performance problems when used with this test (elastic#59571)
  Check for alert dialog when doing a force logout (elastic#59329)
  ensure fs deletes are not cwd dependent (elastic#59570)
  Empty message for APM service map (elastic#59518)
  [Drilldowns] <ActionWizard/> Component (elastic#59032)
  [Reporting] Improve the page exit error messages (elastic#59351)
  Ensure logged out starting state for tests that need it (elastic#59322)
  Hide input value from kbn-config-schema error messages (elastic#58843)
  [ML] Transforms: Migrate client plugin to NP. (elastic#59443)
  [ML] Disable failing functional tests
  [SIEM] Update Timeline to use the latest euiFlyoutBody style (elastic#59524)
  Temporarily remove the project mappings for PR labels (elastic#59493)
  [Alerting] replace index threshold graph usage of watcher APIs with new API (elastic#59385)
  [ML] Show view series link in anomalies table for machine_learning_user role (elastic#59549)
  ...
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

MadameSheema added a commit that referenced this pull request Mar 10, 2020
* [SIEM] Adds 'Load prebuilt rules' Cypress test (#59529)

* adds 'load prebuilt rules'

* fixes typecheck issue

* updates jest snapshot

* [SIEM] Adds 'Load prebuilt rules' Cypress test (#59529)

* adds 'load prebuilt rules'

* fixes typecheck issue

* updates jest snapshot

Co-authored-by: patrykkopycinski <[email protected]>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:SIEM v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants