Commit graph

40 commits

Author SHA1 Message Date
Tyler Smalley
2dcd3cc4c6
[test] Comment out Jest hooks in skipped blocks (#59086)
* [test] Comment out Jest hooks in skipped blocks

Jest will run the hooks regardless of if they are skipped.

Tests skipped in 61c9dc4022
and 420ded8eb2 were still resulting in build failures due to the beforeEach failing.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Additional variables/imports no longer needed

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Skip additional flaky ingest tests

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Comment out file

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Must have one test

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-03-03 10:51:20 -08:00
Larry Gregory
74ee0d0ba4
[Docs] - Deprecate kibana_user role (#54606)
* rename kibana_user => kibana_admin

* add migration note

* [DOCS] Fixes link for use in multiple books

* i18n fixes after merge from master

* fix i18n

* Apply suggestions from code review

Co-Authored-By: gchaps <33642766+gchaps@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
2020-01-31 14:26:12 -05:00
Jean-Louis Leysens
dfce824e8e [Index Management] Add Mappings Editor to Index Template Wizard (#47562) 2020-01-14 17:09:29 -08:00
Larry Gregory
e6e1373db2
Security - Role Mappings UI (#53620)
* Initial role mappings UI

* apply design edits

* address PR feedback

* fix type cast for number field

* Update x-pack/legacy/plugins/security/public/views/management/role_mappings/edit_role_mapping/components/mapping_info_panel/mapping_info_panel.tsx

Co-Authored-By: Joe Portner <5295965+jportner@users.noreply.github.com>

* Cleanup FTR configuration, and handle role mapping 404 errors properly

* align naming of role mappings feature check

* Apply suggestions from code review

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>

* add missing test assertions

* inlining feature check logic

* switch to using snapshot

* use href instead of onClick

* adding delete unit test

* consolidate href building

* unify page load error handling

* simplify initial loading state

* documenting unconditional catch blocks

* use nodes.info instead of transport.request

* Apply suggestions from code review

Co-Authored-By: Brandon Kobel <brandon.kobel@gmail.com>

* move model out of LP into NP

* convert except_field_rule to except_any_rule

* docs, take 1

* update gif

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-11 13:26:31 -05:00
spalger
8e9a8a84dc autofix all violations 2019-12-13 23:17:13 -07:00
Sébastien Loix
439708a6f9 [Dependencies]: upgrade react to latest v16.12.0 (#51145) 2019-11-28 10:56:47 +01:00
Greg Thompson
998b0e6fd6
Upgrade EUI to v14.9.0 (#49678)
* eui to 14.9.0

* euiswitch updtates

* misc snapshot

* x-pack functional fixes

* more euiswitch functional test fixes

* label-less switches for spaces management

* more euiswitch fixes

* telemetry form a11y

* snapshot update

* label updates

* more switch updates

* lint
2019-11-13 14:54:21 -06:00
Tim Roes
fce52133d8
Upgrade Prettier 1.19 (#50487)
* Upgrade Prettier to 1.19

* Fix new prettier style
2019-11-13 17:00:02 +01:00
Tre
1947608378
[FTR] Support for new and old es clients (#47377)
* Add dep for new es client,
refactor all mentions of the old client
to the new.
2019-10-08 09:53:24 -06:00
Alison Goryachev
e81494fb5d
SR: SLM retention UI (#45193) 2019-10-02 14:05:59 -04:00
Sébastien Loix
bae7f4727c
[Form Helpers + Template UI] Refactor Template UI using Form lib + helpers (#45287) 2019-09-20 15:35:30 +02:00
spalger
6e3beaeacc skip flaky suite (#44250) 2019-09-01 23:20:22 -07:00
Matt Apperson
3a23ea7e97
adding esArchiver service for Jest contract tests (#44276)
* adding esArchiver service for Jest

* Added validations to the API, sample test has its own archive, now works with an authenticated or un-authenticated stack

* Update x-pack/test_utils/jest/contract_tests/services/es_archiver.ts

* run prettier

* assign default
2019-08-30 06:37:42 -04:00
Dmitry Lemeshko
304f702764
jest & mocha test coverage reporting (#43742)
* grunt task to get mocha tests coverage

* update jest x-pack config to save report in target

* update report path to match /target/kibana-* pattern
2019-08-24 16:48:08 +02:00
Stacey Gammon
a9b479a667
Per panel time range (#43153)
* Per panel time range

* Added tests and fixed lack of await check for incompatibility

* Remove a couple more unneccessary `anys`
2019-08-14 11:54:11 -04:00
Nicolas Chaulet
1aa21c123d
[Tests] Setup contract tests in x-pack (#42345) 2019-08-05 11:15:03 -04:00
Spencer
c3f31c79fb
[jest] disallow invalid describe calls (#41378)
* [jest] disallow invalid describe calls

* correct other describe calls

* remove unnecessary glob

* cast decribe names to strings

* remove new async describe function
2019-07-18 10:11:33 -07:00
Matt Apperson
b92f4378d6
refactor startTestServers for individual start and stop (#40545)
* refactor startTestServers for individual start and stop
2019-07-09 19:57:35 -04:00
Court Ewing
2d171c92f5 Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
Sébastien Loix
941cc44270
[SR] Component integration tests (#36871) 2019-06-13 20:34:47 +02:00
Spencer
31ce503c0a
[xpack/encryptionKeys] use default keys when running from source (#36452)
* [xpack/encryptionKeys] use default keys when running from source

* add tests for the config schema with different contexts

* share the getConfigSchema helper

* await promises returned by expect().resolves

* tweak test naming

* use data-driven tests

* fix type error

* hide platform dependent config from snapshot
2019-05-10 11:13:06 -07:00
Sébastien Loix
12b93bcdd1
[Testbed utils] Readme + chrome extension (#35724) 2019-05-07 09:58:46 +02:00
Sébastien Loix
63975b84ca
Convert testBed to Typescript + refactor client integration tests (#34981) 2019-04-25 08:28:17 +02:00
Sébastien Loix
29e25c401a
[Remote Clusters] client integration tests for forms (#34807) 2019-04-11 15:11:29 +02:00
Tyler Smalley
b9f81edffe
No longer package X-Pack as a node module (#32722)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-04-10 13:07:23 -07:00
Sébastien Loix
3bc39bdf77
[CCR] Client tests auto-follow pattern & follower index forms (#34449) 2019-04-09 11:43:04 +02:00
CJ Cenizal
8d64071d7f
Clarify rules for which files are run as Jest integration tests (#33869)
* Add RESERVED_DIR_JEST_INTEGRATION_TESTS to src/dev/constants to aid discoverability of which directory names are reserved.
* Add negation rules so the Jest integration tests script ignores test files inside of __jest__/integration_tests dirs.
2019-03-29 10:34:09 -07:00
Tiago Costa
20bdf7d4a9
Migration to Babel7 and @babel/preset-typescript (#33093)
* chore(NA): first changes on every package.json order to support new babel 7. chore(NA): build for kbn-pm with babel 7.

* chore(NA): patch babel register to load typescrit

* chore(NA): first working version with babel 7 replacing typescript compiler.

* fix(NA): common preset declaration in order to make it work with babel-loader.

* chore(na): organizing babel preset env package json.

* chore(NA): mocha tests enabled.

* fix(NA): typo on importing

* test(NA): majority of x-pack tests ported to use babel-jest

* fix(NA): report info button test with babel-jest.

* fix(NA): polling service tests.

* test(na): fix server plugins plugin tests.

* test(NA): batch of test fixs for jest tests under babel-jest hoisting.

* chore(NA): add babel plugin to hoist mock prefixed vars on jest tests.

* chore(NA): update yarn.lock file.

* chore(NA): tests passing.

* chore(NA): remove wrong dep

* chore(NA): fix tsconfig

* chore(NA): skip babel for ts-jest.

* chore(NA): selectively apply the plugin to strip off namespace from ts files.

* chore(NA): remove not needed changes from ts tests

* chore(NA): removed ts-jest dependency. chore(NA): migrate ts tests on x-pack to use babel-jest with the new pattern.

* chore(NA): migrate kibana default distribution typescript tests to run with babel-jest and the new test mock pattern.

* chore(NA): merge and solve conflicts with master.

* chore(NA): fix problems reported by eslint

* chore(NA): fix license ovveride for babel-plugin-mock-imports

* chore(NA): update jest integration tests for kbn pm

* chore(NA): update babel jest integration tests for kbn pm.

* test(NA): update jest integration snapshot for kbn pm.

* chore(NA): apply changes according to the pull request reviews.

* chore(NA): apply changes according to the pull request reviews.

* refact(NA): migrate jest tests to the new pattern.

* fix(NA): babel 7 polyfill in the tests bundle.

* chore(NA): restore needed step in order to compile x-pack with typescript.

* chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7

* Revert "chore(NA): change build to compile typescript with babel for the oss code. chore(NA): change transpile typescript task to only transpile types for x-pack. refact(NA): common preset for babel 7"

This reverts commit 2707d538f5.

* fix(NA): import paths for tabConfigConst

* chore(NA): fix transpiling error on browser tests

* chore(NA): simplify kbn babel preset package.

* chore(NA): migrate build to use babel transpiler for typescript excluding xpack.

* fix(NA): introduced error on test quick task.

* fix(NA): fix preset for client side code on build.

* fix(NA): build with babel

* fix(NA): negated patterns in the end.

* fix(NA): kbn_tp_sample_panel_action creation.

* fix(NA): babel typescript transform plugin workaround when exporting interface name.

* refact(NA): remove not needed type cast to any on jest test.

* docs(NA): add developement documentation about jest mocks test pattern.

* chore(NA): missing unmerged path.

* chore(NA): fix jest tests for template.

* [CCR] Client integration tests (table lists) (#33525)

* Force user to re-authenticate if token refresh fails with `400` status code. (#33774)

* Improve performance of the Logstash Pipeline Viewer (#33793)

Resolves #27513.

_This PR is a combination of #31293 (the code changes) + #33570 (test updates). These two PRs were individually reviewed and merged into a feature branch. This combo PR here simply sets up the merge from the feature branch to `master`._

Summary of changes, taken from #31293:

## Before this PR
The Logstash Pipeline Viewer UI would make a single Kibana API call to fetch all the information necessary to render the Logstash pipeline. This included information necessary to render the detail drawer that opens up when a user clicks on an individual vertex in the pipeline.

Naturally, this single API call fetched _a lot_ of data, not just from the Kibana server but also, in turn, from Elasticsearch as well. The "pro" of this approach was that the user would see instantaneous results if they clicked on a vertex in a pipeline and opened the detail drawer for that vertex. The "cons" were the amount of computation Elasticsearch had to perform and the amount of data being transferred over the wire between Elasticsearch and the Kibana server as well as between the Kibana server and the browser.

## With this PR
This PR makes the Kibana API call to fetch data necessary for **initially** rendering the pipeline — that is, with the detail drawer closed — much lighter. When the user clicks on a vertex in a pipeline, a second API call is then made to fetch data necessary for the detail drawer.

## Gains, by the numbers

Based on a simple, 1-input, 1-filter, and 1-output pipeline.

* Before this PR, the Elasticsearch `logstash_stats` API responses (multiple calls were made using the `composite` aggregation over the `date_histogram` aggregation) generated a total of 1228 aggregation buckets (before any `filter_path`s were applied but across all `composite` "pages"). With this PR, the single `logstash_stats` API response (note that this is just for the initial rendering of the pipeline, with the detail drawer closed) generated 12 buckets (also before any `filter_path`s were applied). That's a **99.02% reduction** in number of buckets.

* Before this PR, the Elasticsearch `logstash_stats` API responses added up to 70319 bytes. With this PR, the single `logstash_stats` API response for the same pipeline is 746 bytes. That's a **98.93% reduction** in size.

* Before this PR, the Elasticsearch `logstash_state` API response was 7718 bytes. With this PR, the API response for the same pipeline is 2328 bytes. That's a **69.83% reduction** in size.

* Before this PR the Kibana API response was 51777 bytes. With this PR, the API response for the same pipeline is 2567 bytes (again, note that this is just for the initial rendering of the pipeline, with the detail drawer closed). That's a **95.04% reduction** in size.

* [Maps] split settings into layer and source panels (#33788)

* [Maps] split settings into layer and source panels

* fix SCSS import

* [env] exit if starting as root (#21563)

* [env] exit if starting as root

* fix windows

* s/--allow-root

* Typescript sample panel action (#33602)

* Typescript sample panel action

* Update EUI version to match main cabana version

* update yarn.lock

* add back typings include

* use correct relative path

* Home page "recent links" should communicate saved object type #21896 (#33694)

* adds object type for screen order
* adds object type for pointer hovering
* Update src/legacy/ui/public/chrome/directives/header_global_nav/components/header.tsx

Co-Authored-By: rockfield <philipp.b@ya.ru>
2019-03-26 20:44:03 +00:00
Sébastien Loix
67acefc283
[CCR] Client integration tests (table lists) (#33525) 2019-03-26 08:47:29 +01:00
Spencer
96c39b695d
[jest/integration] set default test timeout to 30 seconds (#33718)
* [jest/integration] set default test timeout to 30 seconds

* move into dev/jest/setup directory
2019-03-22 15:13:08 -07:00
Sébastien Loix
effebd8c05
Move testbed utils to x-pack/test_utils (#32893) 2019-03-19 08:12:19 +01:00
Felix Stürmer
fa5ac68b4e
[Logs UI] Move summary state out of redux (#31834)
This moves the `log_summary` state out of the redux store into a stateful hook in anticipation of the requirements of creating a fully embeddable log viewer.
2019-03-13 13:01:42 +01:00
spalger
33dc8e6cfd [x-pack/jest/integration] Jest runs setup hook when tests are skipped... 2019-03-11 22:02:38 -07:00
Spencer
f71c091911
temporarily skip flaky test (#32922) 2019-03-11 13:25:01 -07:00
nicknak
bb437d62e5
Testing/Removal of throw on console error (#29983)
* Use hosts instead of url for elasticsearch.

* Adds jest integration tests to run in xpack intake.

* Reverting the exclusion of throwing errors in tests.

* Strange test that seems to fail without console error exception being thrown.

* Fix issues with wrong props for EuiInMemoryTable.

* Removes the masking of console errors in tests.
2019-03-07 14:21:11 -05:00
Felix Stürmer
a9d75988bd
[Logs UI] Slim down local view configuration state (#31723) 2019-03-05 12:32:21 +01:00
nicknak
7cc7147cd5
Testing x pack jest integration (#26825)
* progress

* progress

* cleanup and elastic configs

* make upgrades to support adding aditional users, with

* use defaultDeep to ensure settings pass correctly

* move needed configs to start servers into kbn_server (except x-pack plugin paths and users)

* move xpack config to an export

* add more time

* diff rollbacks

* roll back prettier diff

* revert setupUsers signature

* remove more bluebird

* update bluebird for fixes with jest compatability

* fix ts errors

* dont allow jest to keep going making errors confising

* Separates configs for jest integration core/x-pack.

* Pass nested kbn config parameters.

* Adds example x-pack integration test using live es.

* Cloud detectors should be configurable for tests.

* Cloud detectors should use native promises only.

* No erroneous comments...

* Util is only for promisify, duh!

* New tests should have docuementation to help those looking to utilize them.

* Doc section headings should be consistent with each other.

* With git there is no need to commit commented code.
2019-01-10 14:31:12 -05:00
Leanid Shutau
e9ff201be7
[I18n] Migrate enzyme helpers to TypeScript (#25108)
* [I18n] Migrate enzyme helpers to TypeScript

* Migrate src enzyme helpers

* Remove eslint comments
2018-11-06 15:56:37 +03:00
Maryia Lapata
157477a2d7 Fix/react intl testing helper functions (#24527)
update testing helper functions for react-intl

now we use real intl object passed by IntlProvider via context instead of mocking intl object.
so now data(strings, JSX) passed to FormattedMessage component via values are compiled and
are inserted in the output of FormattedMessage component
2018-11-01 13:54:22 +03:00
Aliaksandr Yankouski
42c291a752 "Index management" translations (#21687)
Apply translations for Index management on Management tab
2018-08-17 11:25:47 +03:00