Commit graph

17 commits

Author SHA1 Message Date
Kibana Machine
ee7521806c
Bump cypress@8.4.1 (#104301) (#113260)
Co-authored-by: Patryk Kopyciński <patryk.kopycinski@elastic.co>
2021-09-28 11:37:29 -04:00
Xavier Mouligneau
3dc053f348
[RAC] T-Grid is moving to a new home (#100265) (#103178)
* wip

* First pass at standalone and embedded redux stores and usage

* wip

* First pass at standalone and embedded redux stores and usage

* wip

* clean up

* wip

* refact(NA): remove extra pkg_npm target and add specific target folders on @kbn/i18n

* cleanup

* - fixes type errors in tests

* WIP remove use_manage_timeline

* wip add query + selector

* finishing integrating timeline manage context from redux

* integrating t-grid in security solution

* fix RowRender type

* WIP begin to move components from package to plugin

* integration of t-grid inside of security solution

* wip to make redux work

* little trick to make  it render

* - fixes a few type errors

* better integration betwen tgrid and security solutions

* bringing back tsconfig on timeline

* wip integration t-grid in observability

* fix types

* fix type in security solutions

* add type to import + trie dto get the bundle size as small as possible

* fix type in integration test

* fix type in integration test

* - fix tests

* clean up to use technical fields

* - fixes unit tests

* - mocks the `useDateFormat` function of the `useKibana` service to fix unit tests

* fix t-grid settings vs create timeline + fix inspect button

* fix last suites test

* Update unit tests, snapshots and lint

* Fix bad merge

* fix plugin export

* Fix some failing tests

* fix unit tets in timelines plugins

* fix latest test

* fix i18n

* free obs from t-grid

* Fix timeline functional plugin types

* fix store provider

* Update failing defaultHeader test

* Fix i18n usage in security solution

* Fix remaining i18n errors in timelines plugin

* Dedupe common shared types

* move drag and drop utils in package to avoid duplication

* More shared type cleanup

* add feature flag

* review I

* fix merge  with master

* fix i18n translation

* More type deduping

* Use @kbn/common-utils, fix remaining types

* fix types

* fix tests

* missing type

* fix cypress tests

Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Andrew Goldstein <andrew.goldstein@elastic.co>

Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
Co-authored-by: Andrew Goldstein <andrew.goldstein@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-24 00:46:39 -04:00
Steph Milovic
6ac1ee2135
[Security Solution] [Bug Fix] Fix flakey cypress tests (#101231) (#101237) 2021-06-02 22:24:46 -04:00
Brandon Kobel
57af8462e4
[7.x] Elastic License 2.0 (#90192)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:39:13 -08:00
Patryk Kopyciński
1a6d7308e5
[Security Solution] Unskip persistent timeline cypress tests (#82972) (#85249) 2020-12-08 13:57:56 +01:00
Liza Katz
f30e0e2919
[Search] Search batching using bfetch (again) (#84043) (#84334)
Re-merging after cypress fixes
2020-11-25 18:23:44 +02:00
Mikhail Shustov
de6090c87b
[7.x] [DX] Prettier v2.2 (#83899) (#84114)
* [DX] Prettier v2.2 (#83899)

* update prettier with ts version support

* mute type-error

* run prettier on codebase

* fix examples

* fix errors after master merged
# Conflicts:
#	x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx
#	x-pack/plugins/upgrade_assistant/server/lib/telemetry/usage_collector.ts

* fix add removed property
2020-11-23 21:24:39 +01:00
Frank Hassanabad
05286a6190
[Security Solutions] Adds additional cypress tests and utils to value based lists (#83026) (#83143)
## Summary

Adds additional cypress tests and utils around value lists so that the percent of test driven development (TDD) possibilities will be easier for us to accomplish around bug fixes towards the next release.

* Changes and adds data test subjects within value based lists
* Fixes a bug where the list fixtures were not being converted to base64 before uploads within Cypress
* Adds a [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) fixture
* Adds tests for export, delete, close and open the dialog, and all the value based list types for the current modal. 

### 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
2020-11-11 08:15:35 -07:00
Patryk Kopyciński
dbc274bd19 [Security Solution] Fix Overview cypress tests (#82761) 2020-11-05 12:38:53 -06:00
Ryland Herrick
86157576cf
[Security Solution][Detections] Fix EQL cypress tests (#80440) (#81204)
* Unskip EQL tests

These _should_ be fixed with the latest ES on master, but let's see if
CI disagrees.

* Wait until alerts have populated on Rule Details

Occasionally our tests hit a scenario where the rule has executed (its
status is "succeeded"), but the generated alerts have not populated in
the same time frame. In this case the test fails oddly, saying that the
"alert count" element is not there when it is.

I attempted to improve the error message by using a .should() with a
callback, but that lead to even stranger behavior as the .should() would
fail once (expected), and then not be able to find the element a second
time. :(

So we instead focus on fixing the real problem, here: wait until alerts
populate (have a non-zero count) before performing the assertion.
Because the page will not update automatically, we can't rely on
cypress' retryability and must instead assert, click Refresh, and assert
again, much like we're doing while waiting for the rule to execute. And
like `waitForTheRuleToBeExecuted`, we're using a while loop that has no
guarantee of ever exiting :(

* More robust cypress assertions

* Uses should with a text matcher instead of using invoke('text')
* Use of not.equal between a string and an element may have been a false
  positive

* Perform cypress loops in a manner guaranteed to exit

We have a few tasks that require polling for some background work to be
completed. The basic form is: assert the byproduct, or refresh the page
and try again.

We were previously doing this with a while loop, which was not
guaranteed to ever complete, leading to cryptic failures if the process
ever hung.

Instead, this implements a safer polling mechanism with a definite
termination similar to the cypress-wait-until plugin.

* Update other specs that are asserting on alerts

* Do not automatically refresh the page
  * This is only necessary if we're not in the state we need. The
    `waitFor` helper functions automatically reload whatever needs to be
    reloaded, so we're delegating this task to them.
* Ensure we wait for alerts to be nonzero before our assertion
  * Otherwise we get some strange behavior around this field's
    availability; see previous commits

* Remove unused import

* Fix false positive in Rule Creation specs

Threat Match Rules introduced an additional query input, causing our
CUSTOM_QUERY_INPUT to be ambiguous.

However, instead of failing due to the ambiguity, the behavior of
cypress seems to be to pass! While I haven't yet tracked down the cause
of these false positives, disambiguating these selectors is the
immediate fix.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-20 14:07:34 -05:00
Patryk Kopyciński
958363b6a4
[Security Solution] Align skip logic across SearchStrategy queries (#79085) (#79495) 2020-10-05 19:42:49 +02:00
Patryk Kopyciński
87d1d55efa
[Security Solution] Refactor OverviewHost and OverviewNetwork to use Search Strategy (#76409) (#76895) 2020-09-07 21:28:10 +02:00
MadameSheema
306fd1355f
[7.x] [SECURITY SOLUTION] Upgrades cypress to v5 (#76002) (#76748)
* [SECURITY SOLUTION] Upgrades cypress to v5 (#76002)

* upgrades cypress to v5

* fix failing test

* removes unnecessary line

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	yarn.lock

* fixes failure
2020-09-05 12:09:58 +02:00
Frank Hassanabad
eaed874517
[Security Solution][Tech Debt] cleans up ts-ignore issues and some smaller linter issues (#74268) (#74296)
## Summary

* Removes ts-ignore where it is not being used
* Replaces ts-ignore with the better alternative which is the ts-expect-error
2020-08-04 16:55:35 -06:00
Ryland Herrick
965939cc8c
[Security Solution][Detections] Adds ip_range and text types to value list upload form (#73109) (#73301)
* Adds two more types to the value lists form

* Adds `ip_range` and `text` types
* Replaces radio group with select

* Add custom command for attaching a file to an input

This will be used to excercise value list uploads.

* Add some missing test subjects for our value lists modal

* Add cypress test for value lists modal

This exercises the happy path: opening the modal, uploading a list, and
asserting that it subsequently appears in the table.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-27 12:24:38 -05:00
MadameSheema
b1f2a6e10f
[SIEM] Cypress renaming (#68659) (#68751)
* updates naming in integration

* updates naming in objects

* updates naming in screens

* updates naming in support

* updates naming in tasks

* fixes failing test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-10 15:14:57 +02:00
Xavier Mouligneau
3bec71e53e
[SECURITY] Rename siem plugin to security_solution (#67902) (#68246)
* rename siem to security_solution

* rename siem to security solution inside of code

* rename translation keys

* fix snapshot

* replace siem for security solution in tutorial

* missing translation to be renamed

* fix types for api test integration

* updates runner file to match the new path

* change category for kibana settings

* miss renaming in advance settings

* fixes cypress tests

* fix api integration test

* fix new translation

* fix unit test

* update translation i18n

* update translation i18n II

Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>

Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
2020-06-04 15:12:05 -04:00
Renamed from x-pack/plugins/siem/cypress/support/commands.js (Browse further)