Commit graph

1143 commits

Author SHA1 Message Date
Chris Roberson
5ec3b03a67
[Tests] Add a helper to detect if functional tests are running against cloud (#51817)
* Add a helper to detect if functional tests are running against cloud

* PR feedback

* Clean up comment

* New eslint rules applied
2019-12-16 13:18:13 -05:00
spalger
8e9a8a84dc autofix all violations 2019-12-13 23:17:13 -07:00
spalger
5fa9b1f0cc skip flaky suite (#48236) 2019-12-12 17:10:55 -07:00
Maja Grubic
c5bf708c55
[Dashboard] Add visualization from dasbhoard empty screen (#52670)
* [Dashboard] Add visualization from dasbhoard empty screen

* Fixing linting errors

* Fixing i18n error

* Fixing unit test that was causing typecheck failure
2019-12-12 16:07:25 +00:00
Joe Reuter
860be3c3eb
Stabilize dashboard save modal functional test (#52761) 2019-12-12 13:36:14 +01:00
Spencer
a25bf49eb8
Add failure screenshot links to JUnit failures (#52449) 2019-12-11 09:42:43 -07:00
Maja Grubic
717e40c444
Move DashboardEmptyScreen inside DashboardViewport (#51939)
* Prototyping adding Visualization to Dashboard

* i18n fixes

* Remvoing dashboard empty screen directive

* Updating test for empty dashboard screen

* Removing unused state variable

* Adding a test for DashboardViewPort

* i18n & minor fixes

* Fixing fullscreen mode view

* Fixing failing functional test (hopefully)

* Minor style fix

* Fixing EUI text, rendering empty screen OR the panels

* Fixing empty screen in fullscreen mode

* Update snapshot

* Trying to render empty screen from Angular controller

* refactor: 💡 don't pass renderEmpty through inputs

And make sure isEmptyState is not stale.

* Fixing tests after Vadim's commit

* Removing unnecessary isEmptyStateProps

* Skipping failing test

* Removing unnecessary en.json file

* Re-adding emptyState, reintroducing functional test

* Fixing ja-JP file

* Undoing my thing to the functional test
2019-12-10 15:05:05 +00:00
Spencer
6ea1b2ccee
[ftr/lifecycle] refactor to be typesafe (#52453)
* [ftr/lifecycle] refactor to be typesafe

* update test fixture
2019-12-09 18:46:45 -07:00
Matt Bargar
77dca06253
Support nested fields in existing filter types (#49537)
* Add automatic support for nested fields in existing filter types

* Index pattern could be undefined

* add test for handleNestedFilter function

* remove console.log

* add tests for all "getFilterField" functions

* update migrateFilters to work on full filter objects so that it doesn't
have to worry about queries that have been wrapped with `nested`

* add test to ensure fromFilters auto wraps filters on nested fields

* Add smoke test for nested filter and move filter editor tests into
their own suite for easier running and debugging

* fix bad type change

* dedupe filterToQuery logic

* fix helper that wasn't doing what it said it did

* Convert test from pre-merge to jest

* Use new time range style
2019-12-09 14:16:15 -05:00
Anton Dosov
b66af16153
fix data-shared-items-container on visualise page (#52370)
Addresses #52109 (comment)

Should fix #51309,
Regression was introduced in: #46910
2019-12-07 16:50:33 +01:00
Matt Bargar
3368ce096c
Preserve currently loaded Saved Query in Discover when page reloads (#52323)
* Fix import

* Add test that would have failed with previous bug
2019-12-06 13:04:26 -05:00
Dmitry Lemeshko
9f024b8067
do not use stdoutsocket for console logs on Windows (#52208) 2019-12-05 18:42:04 +01:00
spalger
bd41b83c18 skip flaky suite (#40670) 2019-12-04 11:25:13 -07:00
Dmitry Lemeshko
57865e43ad
Functional tests: elastic chart provider (#52085)
* adding elastic-chart service

* update visual test
2019-12-04 15:24:42 +01:00
Anton Dosov
c887c42cbf
[Reporting/Visualisation] DOM attributes for reporting integration are missing (#52109) 2019-12-04 13:11:50 +01:00
Anton Dosov
217608d11e
[State Management] Typescripify, jestify, simplify state_hashing and state_storage (#51835)
The hashUrl and unhashUrl functions no longer rely on states being provided as an argument, therefore getUnhashableStates/getUnhashableStatesProvider have been removed.
2019-12-04 12:36:03 +01:00
Spencer
4e5bfc7efa
[ftr/visualize] continue to wait for save completion by default (#51413)
* [ftr/visualize] continue to wait for save completion by default

* capture the toast message when saving the visualization so that it can be inspected if desired

* fix/flaky visualize listing tests (#33)

* move waitForSaveModalToClose from dashboard_page to common_page

* call common_page.waitForSaveModalToClose()

* remove extra wait for toast

* fix trailing spaces

* improve error message of failing test
2019-12-03 12:35:39 -07:00
Tim Roes
05047c39c6
[TSVB] Fix TSVB not saving correctly (#51887)
* Fix TSVB not saving correctly

* Address review

* Add functional test
2019-12-02 13:08:52 +01:00
Nick Partridge
3ed18b4e06
De-angularize visLegend (#50613)
* deangularize visLegend
* update vislib controller to mount react legend directly
* convert legend components to eui
* Position popover based on legend position
* Styles cleanup including removing of unused/unnecessary styles
2019-11-27 20:07:27 -06:00
Anton Dosov
80879368a1
Typescriptify and shim kbn_tp_run_pipeline test plugin (#50645)
* Typscriptify and shim kbn_tp_run_pipeline test plugin

* fix imports to not re-export ‘legacy’ from root of plugin
2019-11-26 14:22:34 +01:00
spalger
90db0b8101 disable flaky suite (#40912) 2019-11-21 18:28:50 -07:00
Greg Thompson
7cbb072554
Upgrade EUI to 16.0.0 (#50779)
* eui to 16.0.0

* type defs

* card click

* snapshot updates

* time format test updates

* ts return

* integration fix

* async

* more time format fixes

* more time format fixes

* test updates

* add uisettings dateformat timepicker test

* after method to clear setting
2019-11-20 17:02:04 -06:00
Spencer
1814957edc
[FTR] expose new es client service (#51066)
* always extend all common config and expose new es client service

* replace `es` service with `legacyEs`
2019-11-20 08:56:23 -07:00
Joe Reuter
9cb37a122b
Kibana app migration: Shim dashboard (#48913) 2019-11-20 09:44:12 +01:00
Dmitry Lemeshko
295f1dfcb1
[services/remote] wrap up clearing browser storage with try/catch (#50840)
* [services/remote] wrap up clearing storage with try/catch

* improve error handling on clearing storage

* apply awesome idea

* fix exception message
2019-11-19 23:39:08 +01:00
Dmitry Lemeshko
6bc43bb9fd
[page_objects/common_page] convert to ts (#50771)
* [page_objects/common_page] convert to ts

* fix lint errors

* descrease navigation timeouts

* use template literal for log messages
2019-11-18 20:08:22 +01:00
Robert Oskamp
39aeaaa19f
Add retry to find.existsByDisplayedByCssSelector (#48734)
This PR fixes timeout handling in `find.existsByDisplayedByCssSelector` for elements that are found but (not yet) displayed.
2019-11-18 09:37:31 +01:00
sainthkh
d7f2ebc308 ui/resize_checker 👉 src/plugins/kibana_utils (#44750)
* Moved ResizeChecker to kibana_utils.

* Removed ResizeChecker from __LEGACY.
2019-11-17 16:22:03 +02:00
Anton Dosov
b5a0d4b03d
Add test for implicitly fixed #45150 (#50284)
#45150 appeared in 7.3 and disappeared in 7.4
2019-11-14 13:08:50 +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
Yuliia Naumenko
a50dbefb62 [Newsfeed] UI plugin for Kibana (#49579)
* Added base folder structure for Newsfeed plugin

* Added base folders for lib and component

* Added newsfeed button to navigation controls on the right side

* add getApi() to return api data observable (#49581)

* Added flyout base body and provided EuiHeaderAlert component inside the newsfeed plugin

* Moved newsfeed plugin to OSS and added for the styles purpose new folder for legacy plugin 'newsfeed' with the same id to support this

* Added subscribe on fetch newsfeed change

* Add NewsfeedApiDriver class (#49710)

* add NewsfeedApiDriver class

* fix xpack prefix

* add corner case handling

* Added data binding to the ui

* added EuiHeaderAlert style overrides (#49739)

* Fixed due to comments on PR

* add missing fields to NewsfeedItem and FetchResult

* fix templating of service url

* gracefully handle temporary request failure

* Mapped missing fields for data and badge

* Fixed typos issues

* integrate i18n.getLocale()

* allow service url root to be changed in dev mode

* replace a lot of consts with config

* fix flyout height (#49809)

* Add "error" field to FetchResult: Error | null

* simplify fetch error handling

* Do not store hash for items that are filtered out

* add expireOn in case it is useful to UI

* always use staging url for dev config

* unit test for newsfeed api driver

* simplify modelItems

* Fixed eslint errors

* Fixed label translations

* Add unit test for concatenating the stored hashes with the new

* add newsfeed to i18n.json

* Fixed expression error

* --wip-- [skip ci]

* fix parse error

* fix test

* test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests

* add tests for getApi()

* add tests for getApi

* Added no news page

* fix fetch not happening after page refresh with sessionStorage primed

* test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests

* Added loading screen

* Small fixes due to comments

* Fixed issue with stop fetching news on error catch

* test(newsfeed): Configure FTS to point newsfeed to the simulated newsfeed endpoit

* Fixed browser error message: Invariant Violation: [React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.

* Fixed typo issue in label name

* polish the code changes

* Add simple jest/enzyme tests for the components

* honor utc format

* Filter pre-published items

* Fall back to en

* retry tests

* comment clarfication

* Setup newsfeed service fixture from test/common/config

* Added base functional tests for newsfeed functionality

* valid urlroot is for prod

* add documentation for the supported enabled setting

* more urlRoot

* --wip-- [skip ci]

* add the before for fn

* add ui_capabilties test

* update jest snapshot

* Fixed failing test

* finish newsfeed error functional test

* include ui_capability config

* error case testing in ci group 6

* refactor(newsfeed): moved newsfeed api call so that it is done before its use

* code polish

* enabled newsfeed_err test in CI
2019-11-13 08:48:34 -07:00
Peter Pisljar
253a10696c
remove visualize loader (#46910) 2019-11-12 09:43:51 -05:00
Jonathan Budzenski
1cc2a34745
Removes references to Elasticsearch mapping types (#47610)
* rm types

* fix infra/reindex test

* rm max_adjacency_matrix_filters

* lint

* more fixes

* comment return

* override documentation links

* typo

* return unfedined

* skip highlight test

* lint
2019-11-11 16:41:08 -06:00
Spencer
0010447f0f
[a11y] add initial accessibility functional tests (#43584)
* [a11y] add initial accessibility functional tests

* add accessibility jobs

* fix config path

* remove percy setup from scripts

* disable color-contrast rule

* apply changes from @myasonik

* define aria-controls/owns props even when suggestions aren't visible

* [ftr/a11y] only throw error when there are errors

* adding tests for management page

* add a11y test for management page

* adding ignore rules' to a11y

* accessibility test for kibana home

* 7 passing tests, 0 failures

* jest snapshot update

* support a11y test in pipeline job

* update a11y test script for pipelines

* use oss compatible ci setup

* fix exclude syntax

* add default exclusion syntax
2019-11-07 10:07:40 -05:00
Maja Grubic
559ac840c5
[Discover] EUI-fication of the filters (#48452)
* New filter UI

* Prototype of functionality

* EUIFication of filters in Discover

* Adding tests for field_selector component

* Replacing FieldSelector with EuiForm components

* Adding more discover field search tests

* Removing console statement

* Fixing failing functional test

* Removing obsolete snapshot

* design tweaks for filter popover

* use compressed style inputs

* Changing selectors to be EuiButtonGroup

* Removing unnecessary if statement

* Getting rid of ts-ignore warning
2019-10-31 17:53:40 +00:00
Vadim Dalecky
75f31130f0
Dashboard container (#49600)
* feat: 🎸 create dasboard embeddable NP plugin, move panel action

* refactor: 💡 pass in getFactories() fn to "replace" action

* refactor: 💡 move dashboard container actions to NP

* refactor: 💡 remove action files from dashboard container in LP

* refactor: 💡 move dashboard grid to NP plugin

* refactor: 💡 move Embeddable SASS to the NP

* refactor: 💡 move dashboard container panel to NP

* refactor: 💡 move dashboard container viewport to NP

* refactor: 💡 move dashboard constant to constants file

* refactor: 💡 move dashboard_continaer file to NP

* refactor: 💡 move dashboard_container_factory.tsx to NP

* chore: 🤖 disable injected React components

* feat: 🎸 fill in NP plugin

* feat: 🎸 move expand panel action to NP

* feat: 🎸 move replace action panel to NP

* feat: 🎸 move dashboard_contaienr to NP

* chore: 🤖 delete LP dasboard container plugin shim

* chore: 🤖 delete LP dashboard_embeddable_container plugin

* chore: 🤖 point translations to the NP plugin

* test: 💍 re-enable dashboard container tests

* chore: 🤖 fix TypeScript type errors

* chore: 🤖 fix more TypeScript tyeps

* test: 💍 fix import in .js test

* feat: 🎸 use <SavedObjectFinder> in dashboard container

* feat: 🎸 add full screen button to dashboard container

* fix: 🐛 execute Chrome hiding only once

* chore: 🤖 put back temporary type substitutions

While moving this plugin file-by-file those types were not available

* chore: 🤖 revert back kibana_react imports

* fix: 🐛 address review comments
2019-10-31 17:56:39 +01:00
Dmitry Lemeshko
d5831e832b FTR: fix "DevToolsActivePort file doesn't exist" error on star… (#48874) 2019-10-30 22:18:46 -07:00
Matt Bargar
1dcec9d210
Add nested field support to KQL (#47070)
This PR adds a new syntax to KQL for querying nested fields.

Nested fields can be queried in two different ways:

Parts of the query may only match a single nested doc (bool inside nested). This is what most people want when querying on a nested field.
Parts of the query may match different nested docs (nested inside bool). This is how a regular object field works but nested fields can be queried in the same way. Although generally less useful, there are occasions where one might want to query a nested field in this way.
The new KQL syntax supports both.
2019-10-30 13:07:43 -04:00
Dmitry Lemeshko
d9a5acf971
FTR: clear browser storage between test suites (#48683)
* clear browser storage on test suite completion

* [logstash/pipeline_list] fix tests dependency

* always load new index data
2019-10-28 09:37:34 -04:00
friol
c718972d11 Add ability to replace any panel in edit mode on the fly (#45095)
* First version of change view functionality

* Adds the 'replace view' functionality to dashboard edit mode

* Fixed type_check errors

* Make action part of dashboard_embeddable_container

* Fixed import paths for type check errors

* Fixed i18n errors

* Renamed action to 'Replace panel' and adjusted jest tests to pass type check

* test: add functional tests

Closes #43900
2019-10-23 16:56:50 -05:00
Maryia Lapata
d5a0f37188
[Visualization] Fix: add vis title to state (#48867)
* Add error when there is no histogram agg when using parent pipeline

* Update error message

* Update message

* Add vis title to state

* Revert unrelated changes

* Update vis title when vis is renamed

* Update title in url when renaming
2019-10-23 16:30:50 +03:00
Dmitry Lemeshko
140f577072
[discover] fix histogram brushing test (#49024)
* [discover] fix histogram brushing test

* use range for expected result
2019-10-23 14:07:57 +02:00
Brian Seeders
fa74cf0c98
Skip flaky test 2019-10-22 10:53:59 -04:00
Robert Oskamp
43f4577083
[ML] Add typeCharByChar option to setValue (#48727)
This PR adds a type option to testSubjects.setValue
2019-10-22 13:32:02 +02:00
Dmitry Lemeshko
b7999157b8
Redesign dashboard tests (#48467) 2019-10-21 23:59:25 +02:00
Spencer
158d86f842
standardize notice-comment usage (#48677)
* standardize notice-comment usage

* regenerate notice.txt
2019-10-21 11:54:45 -07:00
Rashmi Kulkarni
949d2e8f8f
Management Saved object test (#48691) 2019-10-18 16:27:36 -07:00
John Dorlus
7cdd0b2bc9
Hybrid index pattern test (#43498)
* Added 5 second sleep to let thte page load before checking for title.

* Made changes to Rollups page object, added data test subjects to some elements, added function to get Indices to indexmanagement page.

* Removed 5 second wait from old commit,

* Updated home page for a more simplified create rollups method. Simplified data for the rollups to use a simple data structure rather than using makelogs.

* Added stop to the previous rollup job that ran. Added some timeouts to wait for the rollup to run. Added future data to be rolled into hybrid index pattern. Added some custom handling for creating different types of index patterns.

* Added forking condition for if the create index pattern button has the dropdown due to rollup data being present and to handle that case. Changed assertion for rollup job test to ensure that there is one index created with the proper name from the rollup job. Made adjustment to cron expression to run every 10 seconds. Added deletion clauses for all rollup jobs, index patterns and indices to ensure proper teardown.

* Added navigate to the discover page and verify the number of hits.

* Fixed assertion: Not supposed to contain hits.

* Fixing the button that's being searched for.

* Made adjustment to setings page due to test failures.

* Made adjustment to setings page due to test failures.

* Made a change to the order of the parameters for createIndexPattern which was causing non rollup index patterns to break. Also added new conditional and function to click on rollup index pattern button.

* Changed ciGroup and also added logging statements to rollup jobs test.

* Trying an additional wait to see if there is a race condition.

* Changed timing of when rollup job is stopped. It was getting stopped before having triggered.

* Added  waitlogic for condition rather than hardcoded skeep. Used cheerio methods to parse table instead of bluebird's map async. Updated tests assertiuons to ensure the rollup has triggered and produced the right number of documents. Tested many times with Throttling and headless mode enabled.

* Returned the method reloadIndicesButton back to the page object instead of modifying it.

* Changed CI job to run test repeatedly.

* Forgot some script omissions.

* Reverting the script changes. Did not work.

* Readded config to run tests repeatedly per Dima.

* Added additional config for running CI tests.

* Fixed config error.

* Removed extra rollup cration step.

* Made edits per review and added some comments to clarify functions purposes.

* Added explanation of assertion and change that the rollup_info file was renamed.

* Adjusted assertion to compensate for CI's slow network.

* Split the hybrid index pattern test out and rollup job to be in separate files. Mocked out rollups and cleaned up log statements.

* Added load empty kibana to reset kibana to an empty state.

* Removed duplicate file and move method over from it. Updated references.

* Renamed test suite to hybrid index pattern as that's what the test entails

* Fixed missed reference rename.

* Fixed mistaken async keyword causing unhandled rejection error. Also deleted rollup job in hybrid index pattern test in after hook. Renoved log statements.

* Reverted changes to build scripts to normal.

* Fixed jobs file to match upstream due to a missed fix in a merge conflict.

* Added remainder of CI groups to job.

* Removed whitespace error.

* Made fixes per CJs review. Fixed clashing variable names. Reverted rollup job test to assert using rollups table. Changed group back to ciGroup1. Removed duplicate teardown index deletion calls.

* Created more concrete assertion for checking if hybrid index pattern was created. Some refactorings. Changed Math.floor() to Date.now() for avoidance of name collisions.

* Removed the data.json file.

* Addressed nits.
2019-10-17 19:36:54 -07:00
Dmitry Lemeshko
2fb13ce4eb
Improve recently failed tests (#48389)
* [apps/management] improve import objects tests

* [page_objects/dashboard_page] replace link navigation with direct url

* [dashboard/time_zones] reset date format via API

* update jest snapshot

* [management/_kibana_settings] reset date format via API

* revert changees to dashboard tests

* run ciGroup 7 & 8 15x times

* Revert "run ciGroup 7 & 8 15x times"

This reverts commit 8be64d52dc.
2019-10-17 19:37:55 +02:00