Closes#22840
In the functional tests we want a better way to include/exclude certain tests, especially as we move forward with #22359. This PR allows us to decorate suite objects with "tags", which won't clutter up the test names and can be used to filter out specific tests within a single test config. The functional test runner supports defining `--include-tag` and `--exclude-tag` CLI arguments, and multiple can be defined.
The method of filtering out tests for running against cloud has been updated to use this approach and I plan to do the same to #22359 once this is merged.
* Update output file format for i18n_check tool
* Update i18n engine to work with new format
* Update tests
* Fix UI bootstrap test
* Update loader tests and fix getTranslationsByLocale function
* Fix messages passing to IntlProvider
* Update messages interface
* Resolve comments
* Resolve comment
* Add `default` and `baseInterval` configuration ability to date histogram EditorConfig
* Change EditorConfig `warning` to `help`, show `help` below date histogram and histogram interval inputs
* feat(NA): remove red color from the kbn-pm logs.
* refact(NA): removed gray color from the generateColors function.
* chore(NA): update missing km pm dist file.
* Handle exit code of 1 on windows
* Remove space to fix intake failure
* Update using solution from Spencer
* Update debug log message
Co-Authored-By: liza-mae <ldayoub@gmail.com>
* Initial handling of windows process termination (#23441)
* Initial handling of windows process termination
* Update exiting ES cluster process on windows
* Use tree-kill
* Add dependency
* Update with solution from Spencer
* Remove catch statement
* [kbn-es] remove class property from untranspiled js
* Update rmrfSync method
* Add catch statement
* Fix lint issues
* switch to del package
* remove old rmrf_sync module
* Fix CI failure del is not a function error
* Fix spaces
* Add basic support for new K7 navigation
* Make visibility and app title work
* Allow nav controls on right side of navbar
* Use render callback w/ el
* Add support for multiple sides
* Remove fake spaces nav control
* Breadcrumb support
* Hide breadcrumbs in plugins when k7design is enabled:
* Fix units
* Rename k7 -> header
* Add tests
* Fix tests
* Fix loading indicator
* PR comments
* Move ts-ignore
* Use canvasApp icon type
* Add option to functional test server to run elasticsearch from install dir
* Fix variable
* Fix server CLI test
* Updates to include install path in esFrom command line option
* Fix snapshot
* Update args/cli tests
* Keep default snapshot in args/help
This was previously defined in uiExports.app, which limited plugins which are not an app of providing a stylesheet. This allows any plugin to define a stylesheet which will be available on page load.
The plugin helper tests have failed due to timeouts every once and a while, which makes sense because they run a bunch of CLI tasks, so this just moved them to the jest integration tests where tests can take a little longer to run.
I'd really like to upgrade to Typescript 3 for its `unknown` type, but we need to upgrade to `jest@23` to support a recent version of `ts-jest@23`.
The [jest changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) breaks down the breaking changes in 23.x, but I found it to be slightly incomplete so I've broken down the changes that actually caused breaks for us here, and addressed each in individual commits to make review a little easier:
- the `testURL` config default was changed from `about:blank` to `http://localhost`
- this cause some XHR requests powered by JSdom to start failing. It seems these requests just do nothing in master but start to fail when JSdom is initialized with an actual URL... I think we would ideally stop sending meaningless XHR requests in the tests, but it was a lot easier to just set the config to `about:blank` for now, and we can worry about cleanup later if necessary
- `expect(...).toThrow()` only passes if an actual error was thrown.
- In two places in the index pattern code we were throwing strings, which broke the assertions. Fortunately/Unfortunately the errors are not being consumed by anything, so I was able to wrap them in `new Error()` without causing any issues.
- snapshots of mock functions now include a `results` array, detailing the return values of the function
- React fragments are now serialized as `<React.Fragment>` instead of `<UNDEFINED>`
- undefined props in React components are now stripped from snapshots
- minor changes to the ordering of mocks, imports resolution, and before hooks caused the uiSettings API tests to start breaking, but I'm replacing them with totally new tests in #22694 so I just deleted them here
- mocks created with `jest.spyOn()` that are restored now have their `mock.calls` reset, so some of the kbn-pm tests stated failing. This was fixed by restoring them with `jest.restoreAllMocks()` rather than trying to do it before the assertions
This is an attempt to write a log capture integration for the functional test runner that will collect all log output written during a test, prevent it from being written to stdout to lower the amount of work Jenkins master has to do and include the entire log output for each test in the junit report. I'm slightly concerned about the amount of memory we'll be using to store a copy of the logs for each test, but streaming the XML report isn’t easy and there doesn’t seem to be a library out there to help. If we decide it’s torally necessary we might be able to figure it out.