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

[Security Solution][Detections] Integration test for Editing a Rule #77090

Merged
merged 8 commits into from
Sep 15, 2020

Commits on Sep 8, 2020

  1. Add cypress test around editing a detection rule

    Right now this just navigates around and verifies that the form is
    correctly repopulated; next step will be to modify/asset some changes.
    rylnd committed Sep 8, 2020
    Configuration menu
    Copy the full SHA
    07d5f91 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2020

  1. Add assertions for editing a rule

    We already were asserting on the population of the Edit form after
    creation; this additionally makes modifications, saves them, and asserts
    the resulting values on the Rule Details page.
    rylnd committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    6a87ca4 View commit details
    Browse the repository at this point in the history
  2. Remove unused imports

    rylnd committed Sep 9, 2020
    Configuration menu
    Copy the full SHA
    e415125 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2020

  1. Inline our cypress expectations

    So that expectation failures are less obfuscated, the decision was
    previously made to abstract user navigation into functions, but to leave
    expectations directly within the test body.
    rylnd committed Sep 10, 2020
    Configuration menu
    Copy the full SHA
    b174f44 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2020

  1. Dynamically assert Rule Details based on titles

    Rule Details are unfortunately unstructured: they're an array of <dt>s
    and <dd>s without any hierarchy. To address this, tests
    were previously hardcoding the order of these fields, and assertions
    were performed by querying for all <dd>s and then indexing with the
    hardcoded number (e.g. ABOUT_FALSE_POSITIVES).
    
    However, in addition to being unstructured, these fields are also
    _dynamic_, and will be present/absent depending on the data of the given
    rule. Thus, we started needing multiple orderings for the different
    combinations of rule fields/rule types.
    
    In the absence of refactoring how we build rule details, I'm introducing
    a simple helper function to fetch the relevant <dd> by the corresponding
    <dt>s text. This should be more robust to change and more declarative.
    rylnd committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    569980b View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2020

  1. Configuration menu
    Copy the full SHA
    1645496 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2020

  1. Merge branch 'master' into cypress_edit_rule

     Conflicts:
    	x-pack/plugins/security_solution/cypress/screens/create_new_rule.ts
    	x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts
    rylnd committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    5dd2e9c View commit details
    Browse the repository at this point in the history
  2. Fix bad merge conflict

    Lots of these variables no longer exist upstream and this new test
    needed to be refactored.
    rylnd committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    85f55e9 View commit details
    Browse the repository at this point in the history