* fixing mangling of floating point numbers by console
* fixing tests
* fixing issue with large requests
* restoring old code for server side as it handles large responses better
* move find logic to SavedObjectFinder component since savedObjectClient is no longer coupled to angular
* implement flyout open saved searches
* remove old open stuff
* add jest test for OpenSearchPanel and simplify panel title
* fix functional tests
* fix _lab_mode functional test
Migrations are the mechanism by which saved object indices are kept up to date with the Kibana codebase. Plugin authors can write their plugins to work with a certain set of mappings. Migrations ensure that the index actually conforms to those expectations.
* Bring back most of the filtering tests, only bypass the known current issues.
* Clean up after the test suite run so it can be run multiple times in a row.
* goal and guage issues were because of a bad cache
* Updated saveVisualization to wait for toast instead of global indicator
* Fix RBAC tests.
The saveVisualization now fails directly if the visualization is not correctly saved.
* Change editor to use toast for errors
* Change saveVisualization method to new saveVisualizationExpectSuccess
For RBAC tests used also saveVisualizationExpectFail
* Fix wrong exists method call
* Fix missing exist function
* Implement inspector for Saved Searches
* add inspect top nav to discover app
* add functional test, add support for empty results
* clean up functional test names
* create inspector request before processing response
* just getting the popover to open and start laying out the context menu
* pass getUnhashableStates to ShareMenu
* generate original and snapshot ids
* move state into ShareUrlContent
* start working on form
* use radio group
* add input for creating short URL
* display URL in alert until copy functionallity gets migrated to EUI
* allowEmbed prop
* replace share directive with showShareContextMenu
* fix button styling
* add jest test for share_context_menu
* use EuiCopy to copy URL, add jest test for ShareUrlContent component
* clean up
* display short URL create error message in form instead of with toast
* switch option order so disbaled option can not be first
* fix discover share functional tests
* add functions required by reporting
* typescript
* remove empty file
* fix typescript compile error
* move import so jest tests work
* fix Failed prop type: The proptextToCopyis marked as required inEuiCopy, but its value isundefined
* move shortUrl out of react state and into Component object
* getUnhashableStates type from any[] to object[]
* add comment about type change once EUI issue is solved
* add functional test for saved object URL sharing
* remove commit
* add retry to sample data unstall test
* fix flaky sample data test
* remove retry around expect
* simplify solution
* remove onRequestComplete and just track status in state
* move all state into new SampleDataSetCards
* track processing status in seperate object than sampleDataSets
* display toast notifications from SampleDataSetCards component
* remove checks for toast notifications, just causing flakyness
* only load sample data set status on initial component load
* set processing to false when there is an install failure
* Rebuild modulePath correctly if on Windows
* Adding 1 second sleep to fix flaky test
* Wait to find a gear in the visualization after clicking Edit
* Revert "Wait to find a gear in the visualization after clicking Edit"
This reverts commit 8dac3fbd63.
* use waitForRenderComplete and change that to 1s timeout
* Add retry.waitFor
* use waitFor and return === result
* Revert to files from another PR
* Remove a debug console.log
* unskip filtering tests
* always navigate to landing page when trying to load a dashboard up
* more post test clean up - unpin the filter or it'll stick around for other tests.
* Fix heatmap colors to depend on existing number of ranges
If we custom ranges are enabled, depends on number of labels configured, if not depends on configured colorsNumber value
* Fix wrong test descriptions
* Add functional tests for heatmap custom ranges
* Relay on labels.length as valid number of ranges
Instead of check if we have a set of custom ranges or the default ones, we just relay on the labels returned by getHeatmapLabels that already compute the right number of labels depending on the vis config.
While debugging failures I saw in #21772 I found myself encountering failure messages like `Error: expected undefined to sort of equal true`, and other more cryptic errors caused by methods like `PageObjects.dashboard.saveDashboard()` not ensuring that the dashboard was actually saved before resolving. As part of the debugging effort I noticed that the `saveDashboard()` method does have some awareness of the success condition, but rather than asserting success within the method it returns a success boolean for the caller to check, which was only being done in a handful of tests in `test/functional/apps/dashboard/_dashboard_time.js` but was ignored the vast majority of the time.
I think that most of the time we are calling `PageObjects.dashboard.saveDashboard()` we correctly assume that if the dashboard couldn't be saved for some reason the promise will be rejected and the test would fail. If the method was called `maybeSaveDashboard()` or `tryToSaveDashboard()` there might be a signal to consumers that they should check for success conditions, but that would also lead to the same checks all over the place. Instead, this PR reverses the responsibility of checking for success so that code calling `PageObjects.dashboard.saveDashboard()` can continue to assume that if something went wrong their test will fail. It also improves the error message by not using `expect(boolean).to.equal(boolean)`, instead implementing a basic `if()` statement and throwing an error with a meaningful message when something goes wrong.
```js
const isDashboardSaved = await testSubjects.exists('saveDashboardSuccess');
expect(isDashboardSaved).to.eql(true);
```
is now
```js
if (!await testSubjects.exists('saveDashboardSuccess')) {
throw new Error('Expected to find "saveDashboardSuccess" toast after saving dashboard');
}
```
---
I think this type of change could be made to a lot of methods, and would make failures a lot easier to debug and possibly a lot less flaky if we were checking for success conditions in nearly every method we put in our PageObjects. I think it's safe to say that most of the methods we have in PageObjects do not check for actual success criteria, and sometimes that's okay: a method called `clickButton()` can safely resolve once the click method has been called, but a method like `addSampleDataSet()` should be verifying that the sample data set it set out to add was actually added.
a36b87a#diff-aff92ff718af4b68d02f030d8a438754 added an ng-if around the available fields button element. ng-if creates a child scope. The ng-click on the button directly modifies scope state. As a result, when the ng-if was added, that ng-click began modifying the ng-if's child scope instead of the parent scope.
The best solution would be to update the discFieldChooser directive to use the controllerAs property so its scope variables are namespaced. However, this is a bit risky because I'd need to make sure to update every single scope variable reference in the template, and it's a relatively large template. Since we'd like to backport this to 6.4 I've taken the less risky route of adding $parent to the scope reference inside the ng-if block.
* use SavedObjectsClientProvider to provide SavedObjectLoader with an angular wrapped saved object client
* Improve filterBar.addFilter performance
* Add better documentation
* Ease logic of addFilter and add better docs
* Fix old addFilter calls
* Add support for vertical axis
The vertical axis scale has an inverted range (max, min) and we need to compute the absolute scale width instead.
* Add functional test for Y axis scale type switching
* Remove unnecessary waitUntilLoadingHasFinished
* set pause to 'true' when refresh interval is zero
* keep original assertion
* fix expect message in functional tests now that pause is set to true
* fix executorProvider mocha test
* move global state update from kbn_global_timepicker to timefilter
* add functional test
* update time and refreshInterval when either update
* use same function name from kbn_global_timepicker
* call globalState.save in context of a digest cycle
* ensure callers of registerTimefilterWithGlobalState pass in