mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Unskip dashboard filtering tests
This commit is contained in:
parent
1be554f2e5
commit
2ddb052731
5 changed files with 66 additions and 88 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { PanelState, ViewMode } from '../../../services/embeddable';
|
||||
import { ViewMode } from '../../../services/embeddable';
|
||||
import { DashboardContainer, DashboardReactContextValue } from '../dashboard_container';
|
||||
import { DashboardGrid } from '../grid';
|
||||
import { context } from '../../../services/kibana_react';
|
||||
|
@ -26,7 +26,7 @@ interface State {
|
|||
useMargins: boolean;
|
||||
title: string;
|
||||
description?: string;
|
||||
panels: { [key: string]: PanelState };
|
||||
panelCount: number;
|
||||
isEmbeddedExternally?: boolean;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ export class DashboardViewport extends React.Component<DashboardViewportProps, S
|
|||
this.state = {
|
||||
controlGroupReady: !this.props.controlGroup,
|
||||
isFullScreenMode,
|
||||
panels,
|
||||
panelCount: Object.values(panels).length,
|
||||
useMargins,
|
||||
title,
|
||||
isEmbeddedExternally,
|
||||
|
@ -58,15 +58,16 @@ export class DashboardViewport extends React.Component<DashboardViewportProps, S
|
|||
public componentDidMount() {
|
||||
this.mounted = true;
|
||||
this.subscription = this.props.container.getInput$().subscribe(() => {
|
||||
const { isFullScreenMode, useMargins, title, description, isEmbeddedExternally } =
|
||||
const { isFullScreenMode, useMargins, title, description, isEmbeddedExternally, panels } =
|
||||
this.props.container.getInput();
|
||||
if (this.mounted) {
|
||||
this.setState({
|
||||
panelCount: Object.values(panels).length,
|
||||
isEmbeddedExternally,
|
||||
isFullScreenMode,
|
||||
description,
|
||||
useMargins,
|
||||
title,
|
||||
isEmbeddedExternally,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -94,13 +95,13 @@ export class DashboardViewport extends React.Component<DashboardViewportProps, S
|
|||
public render() {
|
||||
const { container } = this.props;
|
||||
const isEditMode = container.getInput().viewMode !== ViewMode.VIEW;
|
||||
const { isEmbeddedExternally, isFullScreenMode, panels, title, description, useMargins } =
|
||||
const { isEmbeddedExternally, isFullScreenMode, panelCount, title, description, useMargins } =
|
||||
this.state;
|
||||
return (
|
||||
<>
|
||||
<div className="dshDashboardViewport-controlGroup" ref={this.controlsRoot} />
|
||||
<div
|
||||
data-shared-items-count={Object.values(panels).length}
|
||||
data-shared-items-count={panelCount}
|
||||
data-shared-items-container
|
||||
data-title={title}
|
||||
data-description={description}
|
||||
|
|
|
@ -28,8 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
const dashboardPanelActions = getService('dashboardPanelActions');
|
||||
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'visualize', 'timePicker']);
|
||||
|
||||
// Failing: See https://github.com/elastic/kibana/issues/92522
|
||||
describe.skip('dashboard filtering', function () {
|
||||
describe('dashboard filtering', function () {
|
||||
this.tags('includeFirefox');
|
||||
|
||||
const populateDashboard = async () => {
|
||||
|
@ -115,13 +114,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('saved search is filtered', async () => {
|
||||
await dashboardExpect.savedSearchRowCount(0);
|
||||
await dashboardExpect.savedSearchRowsMissing();
|
||||
});
|
||||
|
||||
// TODO: Uncomment once https://github.com/elastic/kibana/issues/22561 is fixed
|
||||
// it('timelion is filtered', async () => {
|
||||
// await dashboardExpect.timelionLegendCount(0);
|
||||
// });
|
||||
it('timelion is filtered', async () => {
|
||||
await dashboardExpect.timelionLegendCount(0);
|
||||
});
|
||||
|
||||
it('vega is filtered', async () => {
|
||||
await dashboardExpect.vegaTextsDoNotExist(['5,000']);
|
||||
|
@ -177,13 +175,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('saved search is filtered', async () => {
|
||||
await dashboardExpect.savedSearchRowCount(0);
|
||||
await dashboardExpect.savedSearchRowsMissing();
|
||||
});
|
||||
|
||||
// TODO: Uncomment once https://github.com/elastic/kibana/issues/22561 is fixed
|
||||
// it('timelion is filtered', async () => {
|
||||
// await dashboardExpect.timelionLegendCount(0);
|
||||
// });
|
||||
it('timelion is filtered', async () => {
|
||||
await dashboardExpect.timelionLegendCount(0);
|
||||
});
|
||||
|
||||
it('vega is filtered', async () => {
|
||||
await dashboardExpect.vegaTextsDoNotExist(['5,000']);
|
||||
|
@ -206,7 +203,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('area, bar and heatmap charts', async () => {
|
||||
await dashboardExpect.seriesElementCount(3);
|
||||
await dashboardExpect.seriesElementCount(2);
|
||||
});
|
||||
|
||||
it('data tables', async () => {
|
||||
|
@ -238,7 +235,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('saved searches', async () => {
|
||||
await dashboardExpect.savedSearchRowCount(1);
|
||||
await dashboardExpect.savedSearchRowsExist();
|
||||
});
|
||||
|
||||
it('vega', async () => {
|
||||
|
|
|
@ -2316,7 +2316,7 @@
|
|||
"title": "Filter Bytes Test: tsvb top n with bytes filter",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"title\":\"Filter Bytes Test: tsvb top n with bytes filter\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"Filter Bytes Test:>100\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"split_color_mode\":\"gradient\"},{\"id\":\"4fd5b150-4194-11e8-a461-7d278185cba4\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"4fd5b151-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"Filter Bytes Test:>3000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}"
|
||||
"visState":"{\"title\":\"Filter Bytes Test: tsvb top n with bytes filter\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"top_n\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"Filter Bytes Test:>100\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"split_color_mode\":\"gradient\"},{\"time_range_mode\":\"entire_time_range\",\"id\":\"4fd5b150-4194-11e8-a461-7d278185cba4\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"id\":\"4fd5b151-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"filter\":{\"query\":\"Filter Bytes Test:>3000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}"
|
||||
}
|
||||
},
|
||||
"type": "_doc"
|
||||
|
@ -2379,7 +2379,7 @@
|
|||
"title": "Filter Bytes Test: tsvb time series with bytes filter split by clientip",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"title\":\"Filter Bytes Test: tsvb time series with bytes filter split by clientip\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"terms\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false},\"aggs\":[]}"
|
||||
"visState":"{\"title\":\"Filter Bytes Test: tsvb time series with bytes filter split by clientip\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"time_range_mode\":\"entire_time_range\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"terms\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"use_kibana_indexes\":false,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}"
|
||||
}
|
||||
},
|
||||
"type": "_doc"
|
||||
|
@ -2600,45 +2600,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
"id": "visualization:63983430-4192-11e8-bb13-d53698fb349a",
|
||||
"index": ".kibana",
|
||||
"source": {
|
||||
"coreMigrationVersion": "7.14.0",
|
||||
"migrationVersion": {
|
||||
"visualization": "7.14.0"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.index",
|
||||
"type": "index-pattern"
|
||||
},
|
||||
{
|
||||
"id": "0bf35f60-3dc9-11e8-8660-4d65aa086b3c",
|
||||
"name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index",
|
||||
"type": "index-pattern"
|
||||
}
|
||||
],
|
||||
"type": "visualization",
|
||||
"updated_at": "2018-04-17T15:06:36.275Z",
|
||||
"visualization": {
|
||||
"description": "",
|
||||
"kibanaSavedObjectMeta": {
|
||||
"searchSourceJSON": "{\"filter\":[{\"meta\":{\"negate\":false,\"disabled\":false,\"alias\":null,\"type\":\"phrase\",\"key\":\"geo.src\",\"value\":\"US\",\"params\":{\"query\":\"US\",\"type\":\"phrase\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match\":{\"geo.src\":{\"query\":\"US\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}],\"query\":{\"query\":\"Filter Bytes Test:>5000\",\"language\":\"lucene\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"
|
||||
},
|
||||
"title": "Filter Bytes Test: geo map with filter and query bytes > 5000 in US geo.src, heatmap setting",
|
||||
"uiStateJSON": "{\"mapZoom\":7,\"mapCenter\":[42.98857645832184,-75.49804687500001]}",
|
||||
"version": 1,
|
||||
"visState": "{\"title\":\"Filter Bytes Test: geo map with filter and query bytes > 5000 in US geo.src, heatmap setting\",\"type\":\"tile_map\",\"params\":{\"mapType\":\"Heatmap\",\"isDesaturated\":true,\"addTooltip\":true,\"heatClusterSize\":1.5,\"legendPosition\":\"bottomright\",\"mapZoom\":2,\"mapCenter\":[0,0],\"wms\":{\"enabled\":false,\"options\":{\"format\":\"image/png\",\"transparent\":true},\"baseLayersAreLoaded\":{},\"tmsLayers\":[{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"<p>© <a href=\\\"http://www.openstreetmap.org/copyright\\\">OpenStreetMap</a> contributors | <a href=\\\"https://www.elastic.co/elastic-maps-service\\\">Elastic Maps Service</a></p> \",\"subdomains\":[]}],\"selectedTmsLayer\":{\"id\":\"road_map\",\"url\":\"https://tiles-stage.elastic.co/v2/default/{z}/{x}/{y}.png?elastic_tile_service_tos=agree&my_app_name=kibana&my_app_version=6.3.0\",\"minZoom\":0,\"maxZoom\":10,\"attribution\":\"<p>© <a href=\\\"http://www.openstreetmap.org/copyright\\\">OpenStreetMap</a> contributors | <a href=\\\"https://www.elastic.co/elastic-maps-service\\\">Elastic Maps Service</a></p> \",\"subdomains\":[]}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"geohash_grid\",\"schema\":\"segment\",\"params\":{\"field\":\"geo.coordinates\",\"autoPrecision\":true,\"isFilteredByCollar\":true,\"useGeocentroid\":true,\"precision\":4}}]}"
|
||||
}
|
||||
},
|
||||
"type": "_doc"
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"type": "doc",
|
||||
"value": {
|
||||
|
@ -2817,7 +2778,7 @@
|
|||
"title": "Filter Bytes Test: tsvb metric with custom interval and bytes filter",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"title\":\"Filter Bytes Test: tsvb metric with custom interval and bytes filter\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":1,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1d\",\"value_template\":\"{{value}} custom template\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}"
|
||||
"visState":"{\"title\":\"Filter Bytes Test: tsvb metric with custom interval and bytes filter\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"metric\",\"series\":[{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"everything\",\"metrics\":[{\"value\":\"\",\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"sum\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":1,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1d\",\"value_template\":\"{{value}} custom template\",\"split_color_mode\":\"gradient\",\"series_drop_last_bucket\":1}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":0,\"isModelInvalid\":false,\"bar_color_rules\":[{\"id\":\"71f4e260-4186-11ec-8262-619fbabeae59\"}]}}"
|
||||
}
|
||||
},
|
||||
"type": "_doc"
|
||||
|
@ -2846,7 +2807,7 @@
|
|||
"title": "Filter Bytes Test: tsvb markdown",
|
||||
"uiStateJSON": "{}",
|
||||
"version": 1,
|
||||
"visState": "{\"title\":\"Filter Bytes Test: tsvb markdown\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"label\":\"\",\"var_name\":\"\",\"split_color_mode\":\"gradient\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"markdown\":\"{{bytes_1000.last.formatted}}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true},\"aggs\":[]}"
|
||||
"visState":"{\"title\":\"Filter Bytes Test: tsvb markdown\",\"type\":\"metrics\",\"aggs\":[],\"params\":{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"markdown\",\"series\":[{\"time_range_mode\":\"last_value\",\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"filters\",\"metrics\":[{\"id\":\"482d6560-4194-11e8-a461-7d278185cba4\",\"type\":\"avg\",\"field\":\"bytes\"}],\"seperate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"number\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":0.5,\"stacked\":\"none\",\"terms_field\":\"clientip\",\"filter\":{\"query\":\"Filter Bytes Test:>1000\",\"language\":\"lucene\"},\"override_index_pattern\":0,\"series_index_pattern\":\"logstash-*\",\"series_time_field\":\"utc_time\",\"series_interval\":\"1m\",\"value_template\":\"\",\"split_filters\":[{\"filter\":{\"query\":\"bytes:>1000\",\"language\":\"lucene\"},\"label\":\"\",\"color\":\"#68BC00\",\"id\":\"39a107e0-4194-11e8-a461-7d278185cba4\"}],\"label\":\"\",\"var_name\":\"\",\"split_color_mode\":\"gradient\",\"series_drop_last_bucket\":1}],\"time_field\":\"@timestamp\",\"index_pattern\":\"logstash-*\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"show_legend\":1,\"show_grid\":1,\"background_color_rules\":[{\"id\":\"06893260-4194-11e8-a461-7d278185cba4\"}],\"bar_color_rules\":[{\"id\":\"36a0e740-4194-11e8-a461-7d278185cba4\"}],\"markdown\":\"{{bytes_1000.last.formatted}}\",\"use_kibana_indexes\":false,\"hide_last_value_indicator\":true,\"axis_scale\":\"normal\",\"truncate_legend\":1,\"max_lines_legend\":1,\"tooltip_mode\":\"show_all\",\"drop_last_bucket\":1,\"isModelInvalid\":false}}"
|
||||
}
|
||||
},
|
||||
"type": "_doc"
|
||||
|
|
|
@ -155,30 +155,34 @@ export class DashboardExpectService extends FtrService {
|
|||
async emptyTagCloudFound() {
|
||||
this.log.debug(`DashboardExpect.emptyTagCloudFound()`);
|
||||
const tagCloudVisualizations = await this.testSubjects.findAll('tagCloudVisualization');
|
||||
const tagCloudsHaveContent = await Promise.all(
|
||||
tagCloudVisualizations.map(async (tagCloud) => {
|
||||
return await this.find.descendantExistsByCssSelector('text', tagCloud);
|
||||
})
|
||||
);
|
||||
expect(tagCloudsHaveContent.indexOf(false)).to.be.greaterThan(-1);
|
||||
if (tagCloudVisualizations.length > 0) {
|
||||
const tagCloudsHaveContent = await Promise.all(
|
||||
tagCloudVisualizations.map(async (tagCloud) => {
|
||||
return await this.find.descendantExistsByCssSelector('text', tagCloud);
|
||||
})
|
||||
);
|
||||
expect(tagCloudsHaveContent.indexOf(false)).to.be.greaterThan(-1);
|
||||
}
|
||||
}
|
||||
|
||||
async tagCloudWithValuesFound(values: string[]) {
|
||||
this.log.debug(`DashboardExpect.tagCloudWithValuesFound(${values})`);
|
||||
const tagCloudVisualizations = await this.testSubjects.findAll('tagCloudVisualization');
|
||||
const matches = await Promise.all(
|
||||
tagCloudVisualizations.map(async (tagCloud) => {
|
||||
const tagCloudData = await this.tagCloud.getTextTagByElement(tagCloud);
|
||||
for (let i = 0; i < values.length; i++) {
|
||||
const valueExists = tagCloudData.includes(values[i]);
|
||||
if (!valueExists) {
|
||||
return false;
|
||||
if (tagCloudVisualizations.length > 0) {
|
||||
const matches = await Promise.all(
|
||||
tagCloudVisualizations.map(async (tagCloud) => {
|
||||
const tagCloudData = await this.tagCloud.getTextTagByElement(tagCloud);
|
||||
for (let i = 0; i < values.length; i++) {
|
||||
const valueExists = tagCloudData.includes(values[i]);
|
||||
if (!valueExists) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
})
|
||||
);
|
||||
expect(matches.indexOf(true)).to.be.greaterThan(-1);
|
||||
return true;
|
||||
})
|
||||
);
|
||||
expect(matches.indexOf(true)).to.be.greaterThan(-1);
|
||||
}
|
||||
}
|
||||
|
||||
async goalAndGuageLabelsExist(labels: string[]) {
|
||||
|
@ -232,6 +236,14 @@ export class DashboardExpectService extends FtrService {
|
|||
});
|
||||
}
|
||||
|
||||
async savedSearchRowsExist() {
|
||||
this.testSubjects.existOrFail('docTableExpandToggleColumn');
|
||||
}
|
||||
|
||||
async savedSearchRowsMissing() {
|
||||
this.testSubjects.missingOrFail('docTableExpandToggleColumn');
|
||||
}
|
||||
|
||||
async dataTableRowCount(expectedCount: number) {
|
||||
this.log.debug(`DashboardExpect.dataTableRowCount(${expectedCount})`);
|
||||
await this.retry.try(async () => {
|
||||
|
|
|
@ -12,7 +12,14 @@ import { farequoteLuceneFiltersSearchTestData } from './index_test_data';
|
|||
const SHOW_FIELD_STATISTICS = 'discover:showFieldStatistics';
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const PageObjects = getPageObjects(['common', 'discover', 'timePicker', 'settings', 'dashboard']);
|
||||
const PageObjects = getPageObjects([
|
||||
'common',
|
||||
'discover',
|
||||
'timePicker',
|
||||
'settings',
|
||||
'dashboard',
|
||||
'header',
|
||||
]);
|
||||
const ml = getService('ml');
|
||||
const retry = getService('retry');
|
||||
const dashboardAddPanel = getService('dashboardAddPanel');
|
||||
|
@ -55,10 +62,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.dashboard.gotoDashboardLandingPage();
|
||||
await PageObjects.dashboard.clickNewDashboard();
|
||||
await dashboardAddPanel.addSavedSearch(savedSearchTitle);
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
await PageObjects.timePicker.setAbsoluteRange(startTime, endTime);
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
for (const fieldRow of testData.expected.metricFields as Array<
|
||||
Required<MetricFieldVisConfig>
|
||||
|
@ -91,13 +98,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
await PageObjects.common.navigateToApp('dashboard');
|
||||
await PageObjects.dashboard.gotoDashboardEditMode(dashboardTitle);
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
await dashboardAddPanel.addSavedSearch(savedSearchTitle);
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
await PageObjects.timePicker.setAbsoluteRange(startTime, endTime);
|
||||
await PageObjects.dashboard.waitForRenderComplete();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
||||
await PageObjects.discover.assertFieldStatsTableNotExists();
|
||||
await PageObjects.dashboard.saveDashboard(dashboardTitle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue