Commit graph

2577 commits

Author SHA1 Message Date
Peter Pisljar aa0c6df8cf
refactoring geohash agg to not use vis (#20298) 2018-07-06 08:38:21 +02:00
Tim Roes 9e7ea330c2
Add missing wait (#20481) 2018-07-05 13:15:44 +02:00
Tim Roes b0057d9eac
Inspector enhancements (#20452)
* Rename trigger button to Inspect

* Change default page size to 20

* Change request description layout

* Fix functional tests

* Fix functional test

* Fix more functional tests
2018-07-05 08:59:50 +02:00
Peter Pisljar f9cc61580a
removing angular dependency from base and react vis types (#20386) 2018-07-04 14:58:10 +02:00
Peter Pisljar 16d806275b
adding dissabled aggs functional tests (#20454) 2018-07-04 12:49:13 +02:00
Peter Pisljar a9c8bfec83
Split editor state from saved state (#20323) 2018-07-04 09:10:55 +02:00
Nathan Reese e308828b83
Remove display from timefilter refreshInterval state (#20348)
* Remove display from refresh state

* fix spelling error, ensure garbage cannot be added to timefilter state
2018-07-03 17:52:10 -06:00
Nathan Reese 3fb2561686
disable flaky dashboard filtering test (#20425) 2018-07-03 15:17:23 -06:00
Nathan Reese c0f0aae5de
Improve Saved object import functional test assertions (#20409)
* disable broken functional tests in saved object import

* add better assertions to verify objects are imported as expected

* more discriptive variable name

* add test case for imported object linked to saved search when saved search does not exist
2018-07-03 11:27:57 -06:00
liza-mae f6237dc112
Add wait for page load to methods (#20390)
* Add wait for page load to methods

* fix trailing space
2018-07-03 10:38:16 -06:00
Peter Pisljar 2d4bb6a19f
Move visualize editor out of visualize directive (#20263) 2018-07-03 14:33:47 +02:00
liza-mae 5613d325bb
Fix flaky context _size tests and bug in context page object file (#20254)
* Update getSuccessorLoadMoreButton() to point to correct selector
Add a sleep in navigateTo() and remove refresh()
Add methods to click predecessor and successor load more buttons
Update waitUntilContextLoadingHasFinished to check buttons are enabled and displayed
Update tests to use click methods

* Fix lint issues
2018-07-02 16:12:19 -06:00
Jen Huang 8def9be997
Field editor to React/EUI (#20245) 2018-06-29 09:45:54 -07:00
CJ Cenizal 3ea4c3e0bc
Simplify Courier interface and organize internals (#20060)
**Interface changes**

There are two goals behind the interface changes:

* Make it clearer which courier modules are meant for public consumption by exporting them from the top level.
* Simplify the courier object by removing responsibilities and focusing its responsibility solely on scheduling search requests via the fetch method and timefilter.refreshInterval Angular event.

I did this by taking the following steps:

* Removing redirectWhenMissing, indexPatterns, SearchSource, and SavedObject from the courier object. I also removed some unused methods from its interface.
* redirectWhenMissing is now a service registered on the kibana/url Angular module.
* indexPatterns is now a service registered on the kibana/index_patterns Angular module.
* SearchSourceProvider and SavedObjectProvider are now top-level exports of ui/courier.
* migrateFilter, decorateQuery, buildQueryFromFilters, and luceneStringToDsl are now top-level exports of ui/courier.

**Internal changes**

I also made some internal changes in an effort to organize the code clearly and reduce unnecessary complexity.

* I refactored the async code in CallClient to appear sync with async/await and encapsulated chunks of logic in helper functions. I also used an isAborted flag instead of overwriting the esPromise var with an enum.
* I combined Looper and SearchLooper into a single class and deleted unused functions.
* I reorganized the courier/fetch/request code into SearchRequest, SegmentedSearchRequest, and serializeFetchParams modules.
* Renamed various other methods and variables to improve clarity.
2018-06-27 16:58:19 -07:00
Lee Drengenberg aa6c06e1f3
ES 6 visualize tests (#20178)
* ES 6 visualize tests

* metric_chart es6

* correct test names, no screenshots

* switch spy panel to inspector

* ES 6 visualize tests

* metric_chart es6

* correct test names, no screenshots

* switch spy panel to inspector

* es6 some more tests

* un-skip tag_cloud tests

* fix data table indentation
2018-06-27 16:59:40 -05:00
Peter Pisljar 58cd7c8cb8
reactifying visualization (#16425) 2018-06-27 16:14:45 +02:00
Josh Soref 2b27fb1c5f Fix misspellings (#19981) 2018-06-26 20:17:41 -07:00
archana b03243f5d8
[Functional Tests] Use @kbn/test on Kibana CI (#18967)
* Replace test:api with @kbn/test runTests

* Improve CLI help menu 🆘

* Use --es-from

* Replace jenkins:selenium with kbn-test

* Validate cli args, fixing test in the process

* Clean up some stuff

* Code review fixes

* Explanation for collectCliArgs

* Remove exit codes, they're useless anyway.

* Make markdown vis test pass with dev_mode setting

* Tests

* Remove unneeded export

* Code review: move console logging up to cli.js

* Code review: refactor startServers and runTests to take single options collection

* Code review: Remove all things I am sure we do not use

* Improve tests

* Code review fixes

* Pass created log to runFtr, runElasticsearch, runKibanaServer

* Update --es-from option to --esFrom
2018-06-26 18:08:40 -05:00
liza-mae 2acb0265d8
Fix flaky visualize lab mode tests (#20165)
* Update saveSearch method in discover and add wait page loading for advance settings

* Fix spaces
2018-06-26 10:28:15 -06:00
Rashmi Kulkarni 1ab14f1637
Conversion to ES6 - Discover tests (#20112)
Discover Tests conversion to ES6
2018-06-22 09:38:47 -07:00
Tyler Smalley 937d14126f
Skip flaky vega test (#20127)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-06-21 13:50:13 -07:00
John Dorlus fea9c42d28
[Management] Relationships API test coverage (#19737)
* Added coverage around search and dashboard tests.

* Added tests to check for whether the resource is available. If not, return 404.

* Skipped two tests due to https://github.com/elastic/kibana/issues/19713. Added error handling for relationships API for when no result is found. Return 404.

* Applied patch file per PR.

* Applied Chris patch and tested locally. No failures.

* Removed ajv and utilised joi for schema validation.

* Fixed package.json.

* Copied package.json description from master.

* Reverted package.json and made proper edit.
2018-06-20 15:57:02 -04:00
Tim Roes 2885e871e3
Replace spy panels by Inspector (#16387)
* Add Inspector feature

* So long, and thanks for all the fish, spy panel

* Fix several functional tests

* Fix unit tests

* Fix spy panel button tests

* Replace old spy panel documentation

* Disable test temporarily until we have dashboard triggers

* Enter edit mode for dark theme test

* Fix some more functional tests

* Fix more functional tests

* More test fixing

* Fix more functional tests

* Allow opening the inspector via loader handler

* Refactor InspectorViewChooser, remove unused CSS

* Remove dead code

* Fix data download button style

* Remove redundant code

* Load inspectorViews for dashboard_viewer

* Extract inspector views to custom core_plugin

* Switch API to TypeScript 🎉

* Design changes

* Remove icons from views

* Design changes

* Improve typings of API

* Add typing to all adapters

* Show loading spinner in request selector

* Rewrite InspectorView to TypeScript

* Fix help text for data view

* Remove deprecated React lifecycle methods

* Embed inspector into dashboard panel actions

* Remove temporary inspector trigger

* Remove old CSS

* Fix dashboard trigger for new panel action

* Add tests for InspectorPanel and DataAdapter

* Produce a hierarchical table if the vis is hierarchical

* Remove allowJs option again

* Add missing Apache license headers

* Close inspector on dashboard when navigating away

* Use proper title for dashboard panels

* Fix functional tests

* Skip broken test for now

* Flush view chooser button

* Add request adapter tests

* Skip more tests, broken due to typescript

* Add Request Time description

* Add description for courier request

* Fix tests

* Replace icon by new (not yet released) icon

* Finalize design of inspector

* Remove discover test, that relied on spy panels

* Change API to be properly mockable in tests

* Add aria-live region for request status

* Replace old method in functional tests

* Replace abitrary magic number

* Use object destructuring in vis

* Fix issue with crashing requests view

* Add request time tooltip

* Get request body of correct search source

* Make filter buttons properly keyboard accessible

* Follow Dave's design suggestions

* Remove redundant request from name

* Remove unneeded comments

* WIP raw-formatted values

* Fix filtering issue

* Fix tests and more license headers

* Add data view tests

* Remove search from table

* Fix typos

* Implement review suggestion

* Remove artificial delays for testing

* Fix new panel action structure

* Minor design adjustments

* Fix failing functional test

* Update failing snapshot test

* Implement final wording

* Apply new EUI styling

* Fix closing inspector in tests

* Fix sorting of table

* Align punctuation between tooltips
2018-06-20 11:07:44 +02:00
Stacey Gammon e35b40e946
Fix flaky test where modal dialog isn't loaded when enter key is pressed (#20035) 2018-06-19 16:04:04 -04:00
Rashmi Kulkarni 4661d8543c
ES6 conversion on Console Test (#20009)
* ES6 conversion
2018-06-19 11:15:57 -07:00
Tim Roes 58257c2734
Update EUI to 0.0.53 (#20005)
* Update to EUI 0.0.53

* Remove input vis specific styling

* remove double close button in dashboard add panel flyout (#2)

* Fix functional tests

* fix x-pack snapshots

* EUI 0.0.53 no longer closes combo box when clear btn is pressed (#3)
2018-06-19 17:43:26 +02:00
Tim Roes fbbd5c111e
Skip flaky test for now (#20033) 2018-06-19 14:07:10 +02:00
Spencer b25ab869f7
[ftr/confirmModal] assert expected state rather than just reading (#20019)
I've seen a few failures recently like https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-selenium/4940/console which are caused by the modal not being visible, but if you look at the screenshot you can see the the modal was just about to be displayed but the find didn't wait quite long enough. ~~To fix this temporarily I've increased the `isConfirmModalOpen()` timeout from 2 to 5 seconds.~~

These tests are actually trying to assert that the modal is gone, so rather than simply checking the state of the modal once, the `CommonPage#isConfirmModalOpen()` method has been renamed to `CommonPage#expectConfirmModalOpenState()` which expects a boolean and will assert the state of the confirm modal within a retry, so that as long as the modal eventually transitions to that state it will eventually resolve.

![dashboard app using legacy data dashboard listing page delete default confirm action is cancel 1](https://user-images.githubusercontent.com/1329312/41569272-3215b4aa-731f-11e8-864a-0c0022228245.png)
2018-06-18 21:05:21 -07:00
liza-mae 61a3c9f1ca
Make timelion tests less flaky (#19996)
* Update sleeps in timelion tests

* Add comment
2018-06-18 12:54:54 -06:00
Felix Stürmer cf16b801fd
[Context view] Incrementally increase context time window (#16878)
This PR tries to reduce the Elasticsearch cluster load for index patterns with many indices.

**Theory of operation**

Before this PR, Elasticsearch had to perform the query and sorting for every shard matching the index pattern. In order to avoid that in a time-base indexing scheme, the queries should include a `range` filter. This enables Elasticsearch to rewrite most of the shard accesses to `match_none`. But since the context view operates on document counts, the time intervals need to be determined heuristically:

* start of the interval is the second end of the previous query iteration or `anchor_time` if it is the first iteration
* end of the interval is `interval_start +/- n days` with `n in {1, 7, 30, 365, 10000}` or unlimited if insufficient hits were returned for all `n`

This date arithmetic introduces the assumption that the primary sorting field is a date or at least numeric. Therefore, the `sortingField` has been renamed to `timeField` to make those new assumptions explicit.

**Other notes**

As an additional optimization, the queries are now executed in a `constant_score` filter context to enable caching by Elasticsearch.

Tests for `fetchSuccessors` and `fetchPredecessors` were added.

Changes in ElasticSearch required a concurrent fix of #17696, which is also included. It now splits up the anchor `uid` into `anchorType` and `anchorId` and uses them in an `ids` query.

**Testing**

The fact that only a small subset of the shards are involved in a query should be observable using the `skipped` shard count in the response.

fixes #15143
fixes #17696
2018-06-18 12:31:54 +02:00
Tim Sullivan 633aa4250f
[Saved Objects Client] Return info about what was missing in the 404 (#19868)
* [Saved Objects Client] Return info about what was missing in the 404 error

* update api integration tests

* fix another test
2018-06-15 16:14:04 -07:00
Rashmi Kulkarni 4f4c398380
ES6 conversion on Management Tests (#19870) 2018-06-15 12:52:42 -07:00
liza-mae d5589bff48
Add option to exclude tests in functional test runner (#19806)
* Add option to exclude tests in functional test runner

* Move tag to end of test name
2018-06-13 05:25:07 -06:00
dave.snider@gmail.com 43639cd9c0
[Design] Clean up dashboard listing page (#19657)
Along with @nreese, cleaned up the dashboard listing view to add an empty state.
2018-06-12 17:43:20 -07:00
CJ Cenizal 77b53db939
Change tryForTime error output from 'failure' to 'error', to make it easier to grep the logs for actual failures. (#19707) 2018-06-12 17:19:50 -07:00
CJ Cenizal 647d3366eb
Upgrade EUI to 0.0.52 (#19772)
* Revert "Revert "upping eui to 0.0.52 and updating snapshots (#19761)" (#19770)"
This reverts commit c853072ca5, reintroducing EUI 0.0.52.
* Rename visualize page object selectors for manipulating combo box.
2018-06-12 10:47:20 -07:00
Tim Roes dda5e7b7e9
Skip flaky navigational test (#19751) 2018-06-08 12:12:39 +02:00
Brandon Kobel cb4240a3b2
Skipping flaky lab mode test (#19742)
* Skipping lab mode tests

* Update _lab_mode.js
2018-06-07 16:28:13 -04:00
liza-mae 5ccaca45b3
Remove flaky selectors: .ng-scope, .ng-binding and .ng-isolate.scope (#19688) 2018-06-07 11:17:16 -06:00
Tim Roes e5465ea7f1
Fix broken linked save searches (#19722)
* Fix bug

* Retry navigation
2018-06-07 16:07:43 +02:00
CJ Cenizal 87cccfc101
Revert "Tests for visualization screenshot comparison (#17545)" (#19692)
This reverts commit 84d678bbb9.
2018-06-05 17:08:29 -07:00
Bhavya RM 84d678bbb9 Tests for visualization screenshot comparison (#17545)
* undoing a messy merge

* updating screenshots

* changing the variance to account for data table failure

* trying a different variance for data table and a general one for the rest of the screenshots

* changing the variance for general to .065

* adding xy position to adjust the screensize

* changing variance and setting a small window

* create calibrateForScreenshots method

* remove empty lines
2018-06-05 19:14:29 -04:00
archana 547723f24c
[Functional test server] Watch port for optimize should be different (#19619) 2018-06-05 16:10:15 -05:00
liza-mae a9011b32c1
Update browser window size for console test (#19664) 2018-06-04 16:58:36 -06:00
Stacey Gammon 7440e9734d
Accessibility updates (#19561)
* Announce full screen mode to screen reader, use extra helpful text in panel title input

* Update jest snapshots

* See if removing full sceen mode aria label fixes snapshot test on jenkins.

* Bring back EuiScreenReadyOnly to confirm it is breaking snapshot tests

* Try updating baselines with slightly larger width for the screen

* Move screenready to external, non styled div, go back to original browser size and snapshots

* update snaphots
2018-06-01 11:35:58 -04:00
Stacey Gammon 31bd7a2f63
Unskip 'and preserves edits on cancel' test (#19412)
* unskip 'and preserves edits on cancel' test

* Clean up view edit test before unskipping

* don't use old vis list to determine counts

* Fix bad merge

* get rid of extra view edits, they won't work because of the extra panel... should add a better cleanup... but for the sake of staying focused, running these old school

* Fix bad merge, snapshot tests belong in new data section
2018-05-31 15:31:48 -04:00
Nathan Reese 3dae391e89
Convert Dashboard save dialog to react/EUI (#19531)
* eui save panel

* add title and description inputs

* copy on save

* add jest tests

* fix functional and jest tests

* another functional test fix

* updates from Stacey-Gammon review

* remove debounce because it broke functional tests

* update jest snapshot
2018-05-31 08:28:47 -06:00
Nathan Reese 8de20f23fd
Remove react-select from kibana (#18876)
* remove react-select from AggSelect

* update field_select to use EuiComboBox

* metric_select

* moving_average

* percentile

* series_agg

* std_deviation

* removing some more react-select instances

* icon_select and group_by_select

* gauge type

* markdown

* set isClearable prop

* remove react-select from timeseries config

* remove react-select from timeseries panel options

* remove react select from terms

* remove react-select from table config

* remove react-select from data_format_picker

* fix create_select_handler mocha test

* remove react-select from kibana

* update tsvb functional tests

* set isDisabled prop on EuiComboBox where disabld prop was set for Select

* use durationOutputOptions for duration 'to' options
2018-05-30 09:21:38 -06:00
Stacey Gammon 803d0a61f3
Update dashboard snapshot tests (#19420)
* update snapshot tests

* Update time ranges

* Add sleeps, adjust time, update snapshots

* Skip TSVB until the issue with vertical line placement and x-axis timestamps is fixed

* fix expectations of time range with saved search creation

* remove debug line
2018-05-29 12:58:36 -04:00
Nathan Reese f83a844c1a
skip flaky sample data tests (#19503) 2018-05-29 09:59:30 -06:00