kibana/test/examples
Julia Rechkunova 8d399fe3aa
[UnifiedFieldList] Remove redundant server routes. Create new example plugin for unified field list components and migrate tests. (#158377)
- Closes https://github.com/elastic/kibana/issues/147885
- Closes https://github.com/elastic/kibana/issues/157109

## Summary

**Before:**

Unified Field List plugin has internal routes (wrappers for client code)
which exist only to run api functional tests against them:
 - `/api/unified_field_list/existing_fields/{dataViewId}`
 - `/api/unified_field_list/field_stats`

Client code does not call these routes directly. So there is no reason
in keeping and versioning them.

**After:**
- Internal routes are removed 
- A new "Unified Field List Examples" page was created
http://localhost:5601/app/unifiedFieldListExamples
- API functional tests (which used the routes) were converted to
functional tests against this new example page
- Created a new `unifiedFieldList` page object which is used now in
functional tests (methods are extracted from existing `discover` page
object).

**For testing:**

Steps:
1. Run Kibana with examples: `yarn start --run-examples` 
2. Install sample data
3. And navigate to Developer Examples > Unified Field List Examples
page.

![May-26-2023
13-24-03](5a2149f7-beb8-40a5-b7d5-9eeaabfd42ca)


### 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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-31 13:25:47 +02:00
..
bfetch_explorer [ftr] automatically determine config run order (#130983) 2022-05-04 17:05:58 -05:00
content_management [CM] Onboard maps to cross-type search (#155148) 2023-04-21 07:41:08 -07:00
data_view_field_editor_example [Data views] Add pre-configuration options to runtime field editor fly-out (#136769) 2022-07-22 10:30:01 -07:00
embeddables [Saved Object Finder] Move to the component in saved_objects_finder plugin (#151764) 2023-03-01 22:33:18 +01:00
expressions_explorer [Expressions] Unskip test (#157962) 2023-05-17 14:51:30 +01:00
field_formats [ftr] automatically determine config run order (#130983) 2022-05-04 17:05:58 -05:00
hello_world [ftr] automatically determine config run order (#130983) 2022-05-04 17:05:58 -05:00
partial_results [ftr] automatically determine config run order (#130983) 2022-05-04 17:05:58 -05:00
response_stream [ML] Explain log rate spikes: Move API stream demos to Kibana examples. (#132590) 2022-05-24 16:59:31 +02:00
routing [ftr] automatically determine config run order (#130983) 2022-05-04 17:05:58 -05:00
search [Lens] Don't block render on missing field (#149262) 2023-02-02 18:09:43 -06:00
state_sync [ftr] automatically determine config run order (#130983) 2022-05-04 17:05:58 -05:00
ui_actions [ftr] automatically determine config run order (#130983) 2022-05-04 17:05:58 -05:00
unified_field_list_examples [UnifiedFieldList] Remove redundant server routes. Create new example plugin for unified field list components and migrate tests. (#158377) 2023-05-31 13:25:47 +02:00
config.js [UnifiedFieldList] Remove redundant server routes. Create new example plugin for unified field list components and migrate tests. (#158377) 2023-05-31 13:25:47 +02:00
README.md Add top level examples folder and command to run, --run-examples. (#52027) 2019-12-10 18:02:03 -05:00

Example plugin functional tests

This folder contains functional tests for the example plugins.

Run the test

To run these tests during development you can use the following commands:

# Start the test server (can continue running)
node scripts/functional_tests_server.js --config test/examples/config.js
# Start a test run
node scripts/functional_test_runner.js --config test/examples/config.js

Run Kibana with a test plugin

In case you want to start Kibana with the example plugins, you can just run:

yarn start --run-examples