Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.
OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`
Blocker to #72569
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* Fix edit policy page navigation
* Fix edit policy page navigation
* Add links to PR for explanation
* Added more tests and linked to a github issue about navigation issues
* Fix decoding function for undefined values
* Fix type check issues
* Renamed dollar sign to percent sign, added a method for (double) encoded paths and better description in test names
* Deleted Index Management from required bundles in ILM
* Fixed merge conflicts
* Revert "Deleted Index Management from required bundles in ILM"
This reverts commit 5a735dfe
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add uri decode to es_ui_shared and fix data stream issue with % name
* Add a test for data streams tab opened for name with a dollar sign
* Import uri decode function from es_ui_shared and fix navigation issues for filters
* Add tests for data streams with special characters in name
* Revert react router navigate changes (is done in a separate PR)
* Reverting changes to dataManagement es client and get data stream api route
* Fix data stream name filter when activated from a url parameter
* Clean up for better consistency and fixes after
https://github.com/elastic/kibana/pull/81664
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix showing of accessibility border
- fix use of flex items (removed unnecessary use thereof)
- also fixed overflow when tabbing through drop zones (compressed)
* refactor isLast to compressed
* optimize keyboard focus states in move mode
* fix jest test
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* wip, issues with use fields getting cleared somehow
* New drag and drop text list component
- updated use array to add its own field so that we hook into form
- added new drag and drop list component
- wip on validation (empty lists validate immediately, which it should not)
* remove box shadow from editor fields
* Style grok patterns based on drag and drop in component templates
- still have the issue with validation
- need to get some design review at this point
* fix i18n
* update use_array - maintain the same API though
* Grok processor should use the new use array interface
- also fix the documentation using links in the processor type
description. react was unhappy about hook order changing
* fix patterns field validation to check validity of pattern entires
* fix drag item styling
* fix use of form in use effect and update behaviour of submit button
* added smoke test for grok component
* fix i18n
* Implement PR feedback
* Implemented design feedback
- decreased spacing between list items and button
- fixed a11y issue between label and first text field
- moved help text to under label
- refactored all of the field layout logic into drag and drop
text list component.
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* major wip
* major wip
* fix worker creation leak
* just copy the file over for now
* Remove xjson from static and from es_ui_shared entirely
- moved expand and collapse logic back to es_ui_shared. It has
nothing to do with ace
- refactor the useXJson hook which bundled XJsonMode with it.
This was convenient but ultimately inflates the amount of code
Kibana needs to first load up in the client. Users will need to
import XJsonMode and instantiate it when they want to use it.
Updated existing usage.
- Cleaned up Monaco namespace from es_ui_shared because of how
useXJsonMode was refactored -- no longer exporting an editor
specific instance means this code does not know about anything
to do with code editors so it is decoupled from ace and monaco.
* fix export of collapse and expand string literals
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Fixing formatting issues identified by Prettier, part 2.
* Fixing helpText labels.
* Adding {value} object for dissect processor.
* Incorporating reviewer feedback.
* fix dropdown not rendering
* Fixing typo.
* add support for FormattedMessage in help text
* fix TS
* Updating some strings and trying to add code formatting.
* fix formatted message
* Editing some field descriptions.
* Apply suggestions from code review
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
* Trying to add EuiLink, plus edits.
* fix help text for dissect processor
* Incorporating reviewer feedback.
* Trying to add another EUI element, plus edits.
* fix date_index_name description text
* Minor edit.
* Fixing linter error.
* Removing FunctionComponent, which was not read and caused build errors.
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
* added kv processor form
* added lowercase processor form
* Added pipeline processor form
* added remove processor form
* added rename processor form
* Add script processor form
Also:
- Also refactored name of defaultBoolToUndef to undefinedIfValue
to make it more broadly applicable for deserializing when
default values have been provided
- Refactor to pass in original processor options value so that
a form can initialize based on those values
* Updated the existing set processor form
- also fixed a bug that would render a horizontal line even if
the form has no fields of its own (like the drop processor form)
* Added set_security_user form
* Added split processor form
- also added comments to set_security_user processor
* added sort processor form
* fix: duplicate i18n identifier
* added field to kv processor form for trim value
* replaced all editor heights with a clearer indication of the source of common heights
* remove unused translations
* remove unused translation
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* bump ts to v4
* MOAR RAM
* fix type errors for OSS
* first pass on x-pack errors
* second pass on x-pack type errors
* 3rd pass on x-pack type-errors
* mute errors if complex cases
* don't delete if spread suffices
* mute other complex cases
* make User fields optional
* fix optional types
* fix tests
* fix typings for time_range
* fix type errors in x-pack/tests
* rebuild kbn-pm
* remove leftovers from master update
* fix alert tests
* [Telemetry Checker] TS4 Fixes
* bump to 4.0.1-rc
* fix new errors in master
* bump typescript-eslint to version supporting TS v4 syntax
* fix merge commit errors
* update to the stable TS version 4.0.2
* bump ts-eslint to version supporting ts v4
* fix typo
* fix type errors after merge
* update ts in another new package.json
* TEMP: remove me
* Revert "TEMP: remove me"
This reverts commit dc0fc3bae6.
* [Telemetry] Update snapshot for new TS4 SyntaxKind
* bump prettier to support TS v4 syntax
* fix prettier rules
* last style change
* fix new type errors
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
* Added the enrich processor form (big one)
* added fail processor form
* Added foreach processor form
* Added geoip processor form and refactored some deserialization
* added grok processor form and updated comments and some i18n ids
* updated existing gsub processor form to be in line with other forms
* added html_strip processor form
* refactored some serialize and deserialize functions and added inference processor form
* fix copy-pasta mistake in inference form and add join processor form
* Added JSON processor field
- Also factored out target_field field to common field (still have
to update the all instances)
- Built out special logic for handling add_to_root and
target_field combo on JSON processor form
- Created another serializer, for default boolean -> undefined.
* remove unused variable
* Refactor to use new shared target_field component, and fix JSON serializer bug
* fix i18n
* address pr feedback
* Fix enrich max fields help text copy
* add link to enrich policy docs in help text
* fix error validation message in enrich policy form and replace space with horizontal rule
* address copy feedback
* fix i18n id typo
* fix i18n
* address additional round of feedback and fix json form help text
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* First few processors of the first batch
- Also refactored options to live in scoped objects to avoid
overriding type (important fix!)
- Have not polished copy or form layout.
* add type to shared imports
* Refactors for repeated fields and added forms
- date_index_name
- dissect
- dot_expander
- drop
Fields refactored:
- Field
- Ignore missing
* Fix broken imports and some other small refactors
* added text editor field and updated pattern and if fields
* Large copy improvements and updates and other small refactors
- Added help text for all fields
- Updated layout so that required fields are always on first
- Replaced circle radio group with a select drop down
* update circle shape type field to select
* Added "long" option for convert type
* fix path import
* fix types and i18n
* add validation for dot expander fix append value to be a combobox
* fix i18n
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* wip on fixing processor names
* added comment
* fix Jest test element selector
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add doc titles to CCR, ILM, Index Management, Ingest Node Pipelines, License Management, Remote Clusters, Rollup Jobs, Watcher, and Upgrade Assistant. Clear doc title when leaving Dev Tools.
* Refactor Watcher boot file to follow index-oriented pattern of other plugins.
* first implementation of tooltip
* Add processor tooltip component files
* remove init position from code for now
* colocate on change handler and make code a bit cleaner
* removed document.body.appendChild logic because EuiPortal does that for us
* use correct toggle button api
* added test to check button disabled while editing
* remove cursor not allowed
* simplify logic
* assert if against positive
* remove unused variable
* Remove unused actions const
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>