mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
- added analyze_wildcard to query body
This commit is contained in:
parent
721d3bc29e
commit
a484283837
2 changed files with 10 additions and 24 deletions
|
@ -84,9 +84,10 @@ app.service('savedVisualizations', function (Promise, es, kbnIndex, SavedVis, Pr
|
|||
body = {
|
||||
query: {
|
||||
simple_query_string: {
|
||||
query: searchString + (['/', '!', '?', '&', '=', '%'].indexOf(searchString[searchString.length - 1]) === -1 ? '' : ' ') + '*',
|
||||
query: searchString + '*',
|
||||
fields: ['title^3', 'description'],
|
||||
default_operator: 'AND'
|
||||
default_operator: 'AND',
|
||||
analyze_wildcard: true
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -63,28 +63,13 @@ bdd.describe('visualize app', function describeIndexTests() {
|
|||
var vizName1 = 'Visualization AreaChart';
|
||||
|
||||
bdd.it('should save and load with special characters', function pageHeader() {
|
||||
let vizName2 = vizName1 + '/?&=%';
|
||||
return PageObjects.visualize.saveVisualization(vizName2)
|
||||
.then(function (message) {
|
||||
PageObjects.common.debug('Saved viz message = ' + message);
|
||||
PageObjects.common.saveScreenshot('Visualize-area-chart-save-toast');
|
||||
expect(message).to.be('Visualization Editor: Saved Visualization \"' + vizName2 + '\"');
|
||||
})
|
||||
.then(function testVisualizeWaitForToastMessageGone() {
|
||||
return PageObjects.visualize.waitForToastMessageGone();
|
||||
})
|
||||
.then(function loadSavedVisualization() {
|
||||
return PageObjects.visualize.loadSavedVisualization(vizName2);
|
||||
})
|
||||
.then(function () {
|
||||
return PageObjects.visualize.waitForVisualization();
|
||||
})
|
||||
// We have to sleep sometime between loading the saved visTitle
|
||||
// and trying to access the chart below with getXAxisLabels
|
||||
// otherwise it hangs.
|
||||
.then(function sleep() {
|
||||
return PageObjects.common.sleep(2000);
|
||||
});
|
||||
const vizNamewithSpecialChars = vizName1 + '/?&=%';
|
||||
return PageObjects.visualize.saveVisualization(vizNamewithSpecialChars)
|
||||
.then(function (message) {
|
||||
PageObjects.common.debug(`Saved viz message = ${message}`);
|
||||
PageObjects.common.saveScreenshot('Visualize-area-chart-save-toast');
|
||||
expect(message).to.be(`Visualization Editor: Saved Visualization "${vizNamewithSpecialChars}"`);
|
||||
});
|
||||
});
|
||||
|
||||
bdd.it('should save and load', function pageHeader() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue