From e4f727e2fec53620dd395a2c73e53511717cffb3 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 12 Nov 2024 22:09:31 +1100 Subject: [PATCH] [8.x] [Visualize] remove never executing functional tests code (#198512) (#199737) # Backport This will backport the following commits from `main` to `8.x`: - [[Visualize] remove never executing functional tests code (#198512)](https://github.com/elastic/kibana/pull/198512) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com> --- .../apps/getting_started/_shakespeare.ts | 2 +- .../apps/visualize/group2/_gauge_chart.ts | 6 +- .../apps/visualize/group2/_heatmap_chart.ts | 8 +- .../apps/visualize/group3/_pie_chart.ts | 69 ++++---- .../visualize/group5/_tsvb_time_series.ts | 2 +- .../_area_chart.ts | 24 +-- .../_line_chart_split_chart.ts | 26 +-- .../_line_chart_split_series.ts | 26 +-- .../_point_series_options.ts | 22 +-- .../replaced_vislib_chart_types/_timelion.ts | 2 +- .../_vertical_bar_chart.ts | 38 ++--- .../_vertical_bar_chart_nontimeindex.ts | 22 +-- .../page_objects/visualize_chart_page.ts | 51 ++---- .../page_objects/visualize_editor_page.ts | 4 +- .../functional/page_objects/visualize_page.ts | 16 +- .../services/visualizations/pie_chart.ts | 158 ++++++------------ .../apps/lens/open_in_lens/agg_based/gauge.ts | 4 +- .../apps/lens/open_in_lens/agg_based/goal.ts | 4 +- .../lens/open_in_lens/agg_based/heatmap.ts | 4 +- .../lens/open_in_lens/agg_based/metric.ts | 4 +- .../apps/lens/open_in_lens/agg_based/pie.ts | 14 +- .../apps/lens/open_in_lens/agg_based/table.ts | 4 +- .../apps/lens/open_in_lens/agg_based/xy.ts | 38 ++--- 23 files changed, 224 insertions(+), 324 deletions(-) diff --git a/test/functional/apps/getting_started/_shakespeare.ts b/test/functional/apps/getting_started/_shakespeare.ts index d0843fb16d042..e7b88cd069dd3 100644 --- a/test/functional/apps/getting_started/_shakespeare.ts +++ b/test/functional/apps/getting_started/_shakespeare.ts @@ -81,7 +81,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // Remove refresh click when vislib is removed // https://github.com/elastic/kibana/issues/56143 - await PageObjects.visualize.clickRefresh(true); + await PageObjects.visualize.clickRefresh(); const expectedChartValues = [111396]; await retry.try(async () => { diff --git a/test/functional/apps/visualize/group2/_gauge_chart.ts b/test/functional/apps/visualize/group2/_gauge_chart.ts index 8ff6d31229081..0f4002efce659 100644 --- a/test/functional/apps/visualize/group2/_gauge_chart.ts +++ b/test/functional/apps/visualize/group2/_gauge_chart.ts @@ -62,7 +62,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.click('gaugePercentageMode'); await testSubjects.setValue('gaugePercentageModeFormatPattern', '0.0%'); await visChart.waitForVisualizationRenderingStabilized(); - await visEditor.clickGo(false); + await visEditor.clickGo(true); await retry.try(async function tryingForTime() { const expectedTexts = ['57.3%', 'Average bytes']; @@ -82,7 +82,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectField('machine.os.raw'); log.debug('Size = 4'); await visEditor.setSize(4); - await visEditor.clickGo(false); + await visEditor.clickGo(true); }); it('should show Split Gauges', async () => { @@ -118,7 +118,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickBucket('Metric', 'metrics'); await visEditor.selectAggregation('Min', 'metrics'); await visEditor.selectField('bytes', 'metrics'); - await visEditor.clickGo(false); + await visEditor.clickGo(true); await retry.try(async function tryingForTime() { const metricValue = await visChart.getGaugeValue(); diff --git a/test/functional/apps/visualize/group2/_heatmap_chart.ts b/test/functional/apps/visualize/group2/_heatmap_chart.ts index a8944f1131d06..a3f03eababdda 100644 --- a/test/functional/apps/visualize/group2/_heatmap_chart.ts +++ b/test/functional/apps/visualize/group2/_heatmap_chart.ts @@ -29,7 +29,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { isNewChartsLibraryEnabled = await visChart.isNewChartsLibraryEnabled( 'visualization:visualize:legacyHeatmapChartsLibrary' ); - await visualize.initTests(isNewChartsLibraryEnabled); + await visualize.initTests(!isNewChartsLibraryEnabled); log.debug('navigateToApp visualize'); await visualize.navigateToNewAggBasedVisualization(); log.debug('clickHeatmapChart'); @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('Field = @timestamp'); await visEditor.selectField('@timestamp'); // leaving Interval set to Auto - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(!isNewChartsLibraryEnabled); }); it('should save and load', async function () { @@ -102,7 +102,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show 6 color ranges if changed on options', async function () { await visEditor.clickOptionsTab(); await visEditor.changeHeatmapColorNumbers(6); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(!isNewChartsLibraryEnabled); await visChart.waitForVisualizationRenderingStabilized(); const legends = await visChart.getLegendEntries(); @@ -143,7 +143,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('customize 2 last ranges'); await visEditor.setCustomRangeByIndex(6, '650', '720'); await visEditor.setCustomRangeByIndex(7, '800', '905'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(!isNewChartsLibraryEnabled); await visChart.waitForVisualizationRenderingStabilized(); const legends = await visChart.getLegendEntries(); diff --git a/test/functional/apps/visualize/group3/_pie_chart.ts b/test/functional/apps/visualize/group3/_pie_chart.ts index d42d6e72f232f..f28ed5c575f19 100644 --- a/test/functional/apps/visualize/group3/_pie_chart.ts +++ b/test/functional/apps/visualize/group3/_pie_chart.ts @@ -28,11 +28,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('pie chart', function () { // Used to track flag before and after reset - let isNewChartsLibraryEnabled = false; const vizName1 = 'Visualization PieChart'; before(async function () { - isNewChartsLibraryEnabled = await visChart.isNewChartsLibraryEnabled(); - await visualize.initTests(isNewChartsLibraryEnabled); + await visualize.initTests(); log.debug('navigateToApp visualize'); await visualize.navigateToNewAggBasedVisualization(); @@ -51,7 +49,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('setNumericInterval 4000'); await visEditor.setInterval('40000', { type: 'numeric' }); log.debug('clickGo'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); }); after(async () => { @@ -70,7 +68,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should show 10 slices in pie chart', async function () { - await pieChart.expectPieSliceCount(10, isNewChartsLibraryEnabled); + await pieChart.expectPieSliceCount(10); }); it('should show correct data', async function () { @@ -109,8 +107,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.toggleOtherBucket(2); await visEditor.toggleMissingBucket(2); log.debug('clickGo'); - await visEditor.clickGo(isNewChartsLibraryEnabled); - await pieChart.expectPieChartLabels(expectedTableData, isNewChartsLibraryEnabled); + await visEditor.clickGo(); + await pieChart.expectPieChartLabels(expectedTableData); }); it('should apply correct filter on other bucket', async () => { @@ -118,7 +116,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await pieChart.filterOnPieSlice('Other'); await visChart.waitForVisualization(); - await pieChart.expectPieChartLabels(expectedTableData, isNewChartsLibraryEnabled); + await pieChart.expectPieChartLabels(expectedTableData); await filterBar.removeFilter('machine.os.raw'); await visChart.waitForVisualization(); }); @@ -128,7 +126,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visChart.filterLegend('Other'); await visChart.waitForVisualization(); - await pieChart.expectPieChartLabels(expectedTableData, isNewChartsLibraryEnabled); + await pieChart.expectPieChartLabels(expectedTableData); await filterBar.removeFilter('machine.os.raw'); await visChart.waitForVisualization(); }); @@ -187,8 +185,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.toggleOtherBucket(3); await visEditor.toggleMissingBucket(3); log.debug('clickGo'); - await visEditor.clickGo(isNewChartsLibraryEnabled); - await pieChart.expectPieChartLabels(expectedTableData, isNewChartsLibraryEnabled); + await visEditor.clickGo(); + await pieChart.expectPieChartLabels(expectedTableData); }); }); @@ -205,9 +203,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Terms'); await visEditor.selectField('machine.os.raw'); await visEditor.toggleDisabledAgg(2); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); - await pieChart.expectPieChartLabels(expectedTableData, isNewChartsLibraryEnabled); + await pieChart.expectPieChartLabels(expectedTableData); }); it('should correctly save disabled agg', async () => { @@ -217,12 +215,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visChart.waitForRenderingCount(); const expectedTableData = ['ios', 'osx', 'win 7', 'win 8', 'win xp']; - await pieChart.expectPieChartLabels(expectedTableData, isNewChartsLibraryEnabled); + await pieChart.expectPieChartLabels(expectedTableData); }); it('should show correct result when agg is re-enabled', async () => { await visEditor.toggleDisabledAgg(2); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); const expectedTableData = [ '0', @@ -287,7 +285,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'osx', ].sort(); - await pieChart.expectPieChartLabels(expectedTableData, isNewChartsLibraryEnabled); + await pieChart.expectPieChartLabels(expectedTableData); }); }); @@ -307,7 +305,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.addNewFilterAggregation(); log.debug('Set the 2nd filter value'); await visEditor.setFilterAggregationValue('geo.dest:"CN"', 1); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); const emptyFromTime = 'Sep 19, 2016 @ 06:31:44.000'; const emptyToTime = 'Sep 23, 2016 @ 18:31:44.000'; log.debug( @@ -315,7 +313,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); await timePicker.setAbsoluteRange(emptyFromTime, emptyToTime); await visChart.waitForVisualization(); - await visChart.expectError(); }); }); describe('multi series slice', () => { @@ -341,7 +338,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickBucket('Split slices'); await visEditor.selectAggregation('Terms'); await visEditor.selectField('geo.dest'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); }); it('should show correct chart', async () => { @@ -398,7 +395,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ['360,000', '47', 'BR', '2'], ].map((row) => // the count of records is not shown for every split level in the new charting library - isNewChartsLibraryEnabled ? [row[0], ...row.slice(2)] : row + [row[0], ...row.slice(2)] ); await inspector.open(); @@ -430,26 +427,22 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { '360,000', 'CN', ].sort(); - if (isNewChartsLibraryEnabled) { - await visEditor.clickOptionsTab(); - await visEditor.togglePieLegend(); - await visEditor.togglePieNestedLegend(); - await visEditor.clickDataTab(); - await visEditor.clickGo(isNewChartsLibraryEnabled); - } + + await visEditor.clickOptionsTab(); + await visEditor.togglePieLegend(); + await visEditor.togglePieNestedLegend(); + await visEditor.clickDataTab(); + await visEditor.clickGo(); + await visChart.filterLegend('CN'); await visChart.waitForVisualization(); - await pieChart.expectPieChartLabels(expectedTableData, isNewChartsLibraryEnabled); + await pieChart.expectPieChartLabels(expectedTableData); await filterBar.removeFilter('geo.dest'); await visChart.waitForVisualization(); }); - it('should still showing pie chart when a subseries have zero data', async function () { - if (isNewChartsLibraryEnabled) { - // TODO: it seems that adding a filter agg which has no results to a pie chart breaks it and instead it shows "no data" - return; - } - + // TODO: it seems that adding a filter agg which has no results to a pie chart breaks it and instead it shows "no data" + it.skip('should still showing pie chart when a subseries have zero data', async function () { await visualize.navigateToNewAggBasedVisualization(); log.debug('clickPieChart'); await visualize.clickPieChart(); @@ -468,7 +461,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Filters'); log.debug('Set the 1st filter value of the aggregation id 3'); await visEditor.setFilterAggregationValue('geo.dest:"UX"', 0, 3); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); const legends = await visChart.getLegendEntries(); const expectedLegends = ['geo.dest:"US"', 'geo.dest:"UX"']; expect(legends).to.eql(expectedLegends); @@ -489,7 +482,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickBucket('Split slices'); await visEditor.selectAggregation('Terms'); await visEditor.selectField('geo.src'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); }); it('shows correct split chart', async () => { @@ -521,7 +514,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ['osx', '1,322', 'BR', '30'], ].map((row) => // the count of records is not shown for every split level in the new charting library - isNewChartsLibraryEnabled ? [row[0], ...row.slice(2)] : row + [row[0], ...row.slice(2)] ); await inspector.open(); await inspector.setTablePageSize(50); @@ -538,7 +531,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ['osx', '228', 'CN', '228'], ].map((row) => // the count of records is not shown for every split level in the new charting library - isNewChartsLibraryEnabled ? [row[0], ...row.slice(2)] : row + [row[0], ...row.slice(2)] ); await visChart.filterLegend('CN'); await header.waitUntilLoadingHasFinished(); diff --git a/test/functional/apps/visualize/group5/_tsvb_time_series.ts b/test/functional/apps/visualize/group5/_tsvb_time_series.ts index 43f18462f74e2..2c2cfe65da1ab 100644 --- a/test/functional/apps/visualize/group5/_tsvb_time_series.ts +++ b/test/functional/apps/visualize/group5/_tsvb_time_series.ts @@ -434,7 +434,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { legendNames = await visualBuilder.getLegendNames(); expect(legendNames).to.eql(['png', 'php']); - await visualize.clickRefresh(true); + await visualize.clickRefresh(); legendNames = await visualBuilder.getLegendNames(); expect(legendNames).to.eql(['png', 'php']); }); diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts index cbbdd8f9ffdca..4d558b1b7c147 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_area_chart.ts @@ -49,7 +49,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const intervalValue = await visEditor.getInterval(); log.debug('intervalValue = ' + intervalValue); expect(intervalValue[0]).to.be('Auto'); - await visEditor.clickGo(true); + await visEditor.clickGo(); }; describe('area charts', function indexPatternCreation() { @@ -177,7 +177,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.toggleOpenEditor(2); await visEditor.setInterval('Second'); - await visEditor.clickGo(true); + await visEditor.clickGo(); await inspector.open(); await inspector.expectTableData(expectedTableData); await inspector.close(); @@ -209,7 +209,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.toggleAdvancedParams('2'); await visEditor.toggleScaleMetrics(); - await visEditor.clickGo(true); + await visEditor.clickGo(); await inspector.open(); await inspector.expectTableData(expectedTableData); await inspector.close(); @@ -243,7 +243,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Top Hit', 'metrics'); await visEditor.selectField('bytes', 'metrics'); await visEditor.selectAggregateWith('average'); - await visEditor.clickGo(true); + await visEditor.clickGo(); await inspector.open(); await inspector.expectTableData(expectedTableData); await inspector.close(); @@ -277,7 +277,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickYAxisOptions(axisId); await visEditor.selectYAxisScaleType(axisId, 'log'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; const maxLabel = 900; @@ -289,7 +289,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting log scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; const maxLabel = 900; @@ -302,7 +302,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting square root scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'square root'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; expect(labels).to.eql(expectedLabels); @@ -310,7 +310,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting square root scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; expect(labels).to.eql(expectedLabels); @@ -319,7 +319,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting linear scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'linear'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); log.debug(labels); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; @@ -328,7 +328,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting linear scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; expect(labels).to.eql(expectedLabels); @@ -353,7 +353,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Date Histogram'); await visEditor.selectField('@timestamp'); await visEditor.setInterval('Year'); - await visEditor.clickGo(true); + await visEditor.clickGo(); // This svg area is composed by 7 years (2013 - 2019). // 7 points are used to draw the upper line (usually called y1) // 7 points compose the lower line (usually called y0) @@ -376,7 +376,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Date Histogram'); await visEditor.selectField('@timestamp'); await visEditor.setInterval('Month'); - await visEditor.clickGo(true); + await visEditor.clickGo(); // This svg area is composed by 67 months 3 (2013) + 5 * 12 + 4 (2019) // 67 points are used to draw the upper line (usually called y1) // 67 points compose the lower line (usually called y0) diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_line_chart_split_chart.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_line_chart_split_chart.ts index a4a74e499c31d..1a22825467e14 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_line_chart_split_chart.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_line_chart_split_chart.ts @@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectField('extension.raw'); log.debug('switch from Rows to Columns'); await visEditor.clickSplitDirection('Columns'); - await visEditor.clickGo(true); + await visEditor.clickGo(); }; before(async () => { @@ -96,7 +96,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('Order By = Term'); await visEditor.selectOrderByMetric(2, '_key'); - await visEditor.clickGo(true); + await visEditor.clickGo(); await retry.try(async function () { const data = await visChart.getLineChartData(xyChartSelector); log.debug('data=' + data); @@ -181,7 +181,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickYAxisOptions(axisId); await visEditor.selectYAxisScaleType(axisId, 'log'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; const maxLabel = 7000; @@ -193,7 +193,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting log scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; const maxLabel = 7000; @@ -206,7 +206,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting square root scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'square root'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000']; @@ -215,7 +215,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting square root scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000']; expect(labels).to.eql(expectedLabels); @@ -224,7 +224,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting linear scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'linear'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); log.debug(labels); const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000']; @@ -233,7 +233,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting linear scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000']; expect(labels).to.eql(expectedLabels); @@ -262,7 +262,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickBucket('X-axis'); log.debug('Aggregation = Date Histogram'); await visEditor.selectAggregation('Date Histogram'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Serial Diff of Count'); }); @@ -270,7 +270,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should change y-axis label to custom', async () => { log.debug('set custom label of y-axis to "Custom"'); await visEditor.setCustomLabel('Custom', 1); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Custom'); }); @@ -285,7 +285,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should apply with selected bucket', async () => { log.debug('Metrics agg = Average Bucket'); await visEditor.selectAggregation('Average Bucket', 'metrics'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Overall Average of Count'); }); @@ -293,7 +293,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should change sub metric custom label and calculate y-axis title', async () => { log.debug('set custom label of sub metric to "Cats"'); await visEditor.setCustomLabel('Cats', '1-metric'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Overall Average of Cats'); }); @@ -301,7 +301,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should outer custom label', async () => { log.debug('set custom label to "Custom"'); await visEditor.setCustomLabel('Custom', 1); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Custom'); }); diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_line_chart_split_series.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_line_chart_split_series.ts index 3b0ea28b71e41..a8630cec747f8 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_line_chart_split_series.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_line_chart_split_series.ts @@ -39,7 +39,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Terms'); log.debug('Field = extension'); await visEditor.selectField('extension.raw'); - await visEditor.clickGo(true); + await visEditor.clickGo(); }; before(async () => { @@ -94,7 +94,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('Order By = Term'); await visEditor.selectOrderByMetric(2, '_key'); - await visEditor.clickGo(true); + await visEditor.clickGo(); await retry.try(async function () { const data = await visChart.getLineChartData(xyChartSelector); log.debug('data=' + data); @@ -180,7 +180,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickYAxisOptions(axisId); await visEditor.selectYAxisScaleType(axisId, 'log'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; const maxLabel = 900; @@ -192,7 +192,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting log scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; const maxLabel = 900; @@ -205,7 +205,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting square root scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'square root'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000']; expect(labels).to.eql(expectedLabels); @@ -213,7 +213,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting square root scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000']; expect(labels).to.eql(expectedLabels); @@ -222,7 +222,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting linear scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'linear'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); log.debug(labels); const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000']; @@ -231,7 +231,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting linear scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000']; expect(labels).to.eql(expectedLabels); @@ -260,7 +260,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickBucket('X-axis'); log.debug('Aggregation = Date Histogram'); await visEditor.selectAggregation('Date Histogram'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Serial Diff of Count'); }); @@ -268,7 +268,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should change y-axis label to custom', async () => { log.debug('set custom label of y-axis to "Custom"'); await visEditor.setCustomLabel('Custom', 1); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Custom'); }); @@ -283,7 +283,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should apply with selected bucket', async () => { log.debug('Metrics agg = Average Bucket'); await visEditor.selectAggregation('Average Bucket', 'metrics'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Overall Average of Count'); }); @@ -291,7 +291,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should change sub metric custom label and calculate y-axis title', async () => { log.debug('set custom label of sub metric to "Cats"'); await visEditor.setCustomLabel('Cats', '1-metric'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Overall Average of Cats'); }); @@ -299,7 +299,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should outer custom label', async () => { log.debug('set custom label to "Custom"'); await visEditor.setCustomLabel('Custom', 1); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be('Custom'); }); diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_point_series_options.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_point_series_options.ts index 8f55f2f9285fb..9e0aa41f71d84 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_point_series_options.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_point_series_options.ts @@ -58,7 +58,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('Average memory value axis - ValueAxis-2'); await visEditor.setSeriesAxis(1, 'ValueAxis-2'); await visChart.waitForVisualizationRenderingStabilized(); - await visEditor.clickGo(true); + await visEditor.clickGo(); } describe('point series', function describeIndexTests() { @@ -121,7 +121,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('multiple chart types', function () { it('should change average series type to histogram', async function () { await visEditor.setSeriesType(1, 'histogram'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const length = await visChart.getHistogramSeriesCount(xyChartSelector); expect(length).to.be(1); }); @@ -134,7 +134,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show category grid lines', async function () { await visEditor.toggleGridCategoryLines(); - await visEditor.clickGo(true); + await visEditor.clickGo(); const gridLines = await visChart.getGridLines(xyChartSelector); // FLAKY relaxing as depends on chart size/browser size and produce differences between local and CI // The objective here is to check whenever the grid lines are rendered, not the exact quantity @@ -147,7 +147,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show value axis grid lines', async function () { await visEditor.setGridValueAxis('ValueAxis-2'); await visEditor.toggleGridCategoryLines(); - await visEditor.clickGo(true); + await visEditor.clickGo(); const gridLines = await visChart.getGridLines(xyChartSelector); // FLAKY relaxing as depends on chart size/browser size and produce differences between local and CI // The objective here is to check whenever the grid lines are rendered, not the exact quantity @@ -169,21 +169,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Terms'); log.debug('Field = geo.src'); await visEditor.selectField('geo.src'); - await visEditor.clickGo(true); + await visEditor.clickGo(); log.debug('Open Options tab'); await visEditor.clickOptionsTab(); }); it('should show values on bar chart', async () => { await visEditor.toggleValuesOnChart(); - await visEditor.clickGo(true); + await visEditor.clickGo(); const values = await visChart.getChartValues(xyChartSelector); expect(values).to.eql(['2,592', '2,373', '1,194', '489', '415']); }); it('should hide values on bar chart', async () => { await visEditor.toggleValuesOnChart(); - await visEditor.clickGo(true); + await visEditor.clickGo(); const values = await visChart.getChartValues(xyChartSelector); expect(values.length).to.be(0); }); @@ -198,7 +198,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visualize.clickLineChart(); await visualize.clickNewSearch(); await visEditor.selectYAxisAggregation('Average', 'bytes', customLabel, 1); - await visEditor.clickGo(true); + await visEditor.clickGo(); await visEditor.clickMetricsAndAxes(); await visEditor.clickYAxisOptions('ValueAxis-1'); }); @@ -210,7 +210,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should render a custom axis title when one is set, overriding the custom label', async function () { await visEditor.setAxisTitle(axisTitle); - await visEditor.clickGo(true); + await visEditor.clickGo(); const title = await visChart.getYAxisTitle(xyChartSelector); expect(title).to.be(axisTitle); }); @@ -223,7 +223,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickDataTab(); await visEditor.toggleOpenEditor(1); await visEditor.setCustomLabel('test', 1); - await visEditor.clickGo(true); + await visEditor.clickGo(); await visEditor.clickMetricsAndAxes(); await visEditor.clickYAxisOptions('ValueAxis-1'); const title = await visChart.getYAxisTitle(xyChartSelector); @@ -331,7 +331,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await browser.refresh(); // wait some time before trying to check for rendering count await header.awaitKibanaChrome(); - await visualize.clickRefresh(true); + await visualize.clickRefresh(); await visChart.waitForRenderingCount(); log.debug('getXAxisLabels'); diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_timelion.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_timelion.ts index 6c96c9095f2f0..9d9e437632b31 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_timelion.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_timelion.ts @@ -43,7 +43,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const initVisualization = async (expression: string, interval: string = '12h') => { await visEditor.setTimelionInterval(interval); await monacoEditor.setCodeEditorValue(expression); - await visEditor.clickGo(true); + await visEditor.clickGo(); }; it('should display correct data for specified index pattern and timefield', async () => { diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_vertical_bar_chart.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_vertical_bar_chart.ts index 3d0f25b7870a6..ef88a5f14cc21 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_vertical_bar_chart.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_vertical_bar_chart.ts @@ -52,7 +52,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('Field = @timestamp'); await visEditor.selectField('@timestamp'); // leaving Interval set to Auto - await visEditor.clickGo(true); + await visEditor.clickGo(); }; describe('bar charts x axis tick labels', () => { @@ -63,7 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickMetricsAndAxes(); await visEditor.selectXAxisPosition('left'); - await visEditor.clickGo(true); + await visEditor.clickGo(); // the getYAxisLabels helper always returns the labels on the left axis const leftLabels = await visChart.getYAxisLabels(xyChartSelector); @@ -79,13 +79,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Date Range'); await visEditor.selectField('@timestamp'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const bottomLabels = await visChart.getXAxisLabels(xyChartSelector); expect(bottomLabels.length).to.be(1); await visEditor.clickMetricsAndAxes(); await visEditor.selectXAxisPosition('left'); - await visEditor.clickGo(true); + await visEditor.clickGo(); // the getYAxisLabels helper always returns the labels on the left axis const leftLabels = await visChart.getYAxisLabels(xyChartSelector); @@ -105,7 +105,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectField('@timestamp'); await visEditor.clickAddDateRange(); await visEditor.setDateRangeByIndex('1', 'now-2w/w', 'now-1w/w'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const bottomLabels = await visChart.getXAxisLabels(xyChartSelector); expect(bottomLabels.length).to.be(2); }); @@ -194,7 +194,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.toggleOpenEditor(2); await visEditor.clickDropPartialBuckets(); - await visEditor.clickGo(true); + await visEditor.clickGo(); expectedChartValues = [ 218, 341, 440, 480, 517, 522, 446, 403, 321, 258, 172, 95, 55, 38, 24, 3, 4, 11, 14, 17, 38, @@ -222,7 +222,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickYAxisOptions(axisId); await visEditor.selectYAxisScaleType(axisId, 'log'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; @@ -235,7 +235,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting log scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; @@ -249,7 +249,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting square root scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'square root'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; expect(labels).to.eql(expectedLabels); @@ -257,7 +257,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting square root scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; expect(labels).to.eql(expectedLabels); @@ -266,7 +266,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting linear scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'linear'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); log.debug(labels); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; @@ -275,7 +275,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting linear scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; expect(labels).to.eql(expectedLabels); @@ -290,7 +290,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectYAxisMode('percentage'); await visEditor.changeYAxisShowCheckbox(axisId, true); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); expect(labels[0]).to.eql('0%'); expect(labels[labels.length - 1]).to.eql('100%'); @@ -306,7 +306,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Terms'); await visEditor.selectField('response.raw'); await visChart.waitForVisualizationRenderingStabilized(); - await visEditor.clickGo(true); + await visEditor.clickGo(); const expectedEntries = ['200', '404', '503']; // sorting order aligned with the reading direction const legendEntries = await visChart.getLegendEntriesXYCharts(xyChartSelector); @@ -316,7 +316,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should allow custom sorting of series', async () => { await visEditor.toggleOpenEditor(1, 'false'); await visEditor.selectCustomSortMetric(3, 'Min', 'bytes'); - await visEditor.clickGo(true); + await visEditor.clickGo(); const expectedEntries = ['404', '200', '503']; const legendEntries = await visChart.getLegendEntriesXYCharts(xyChartSelector); @@ -324,7 +324,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should correctly filter by legend', async () => { - await visChart.filterLegend('200', true); + await visChart.filterLegend('200'); await visChart.waitForVisualization(); const legendEntries = await visChart.getLegendEntriesXYCharts(xyChartSelector); const expectedEntries = ['200']; @@ -349,7 +349,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectAggregation('Terms'); await visEditor.selectField('machine.os'); await visChart.waitForVisualizationRenderingStabilized(); - await visEditor.clickGo(true); + await visEditor.clickGo(); const expectedEntries = [ '200 - win 8', @@ -376,7 +376,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // this will avoid issues with the play tooltip covering the disable agg button await testSubjects.scrollIntoView('metricsAggGroup'); await visEditor.toggleDisabledAgg(3); - await visEditor.clickGo(true); + await visEditor.clickGo(); const expectedEntries = ['win 8', 'win xp', 'ios', 'osx', 'win 7']; const legendEntries = await visChart.getLegendEntriesXYCharts(xyChartSelector); @@ -392,7 +392,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.toggleOpenEditor(1); await visEditor.selectAggregation('Derivative', 'metrics'); await visChart.waitForVisualizationRenderingStabilized(); - await visEditor.clickGo(true); + await visEditor.clickGo(); const expectedEntries = ['Derivative of Count']; const legendEntries = await visChart.getLegendEntriesXYCharts(xyChartSelector); diff --git a/test/functional/apps/visualize/replaced_vislib_chart_types/_vertical_bar_chart_nontimeindex.ts b/test/functional/apps/visualize/replaced_vislib_chart_types/_vertical_bar_chart_nontimeindex.ts index 15ff0fc18d8e4..f5cff915168f3 100644 --- a/test/functional/apps/visualize/replaced_vislib_chart_types/_vertical_bar_chart_nontimeindex.ts +++ b/test/functional/apps/visualize/replaced_vislib_chart_types/_vertical_bar_chart_nontimeindex.ts @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.selectField('@timestamp'); await visEditor.setInterval('3h', { type: 'custom' }); await visChart.waitForVisualizationRenderingStabilized(); - await visEditor.clickGo(true); + await visEditor.clickGo(); }; before(async () => { @@ -117,7 +117,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visEditor.clickYAxisOptions(axisId); await visEditor.selectYAxisScaleType(axisId, 'log'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; const maxLabel = 900; @@ -129,7 +129,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting log scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabelsAsNumbers(xyChartSelector); const minLabel = 1; const maxLabel = 900; @@ -142,7 +142,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting square root scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'square root'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; expect(labels).to.eql(expectedLabels); @@ -150,7 +150,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting square root scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; expect(labels).to.eql(expectedLabels); @@ -159,7 +159,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show ticks on selecting linear scale', async () => { await visEditor.selectYAxisScaleType(axisId, 'linear'); await visEditor.changeYAxisFilterLabelsCheckbox(axisId, false); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); log.debug(labels); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; @@ -168,7 +168,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show filtered ticks on selecting linear scale', async () => { await visEditor.changeYAxisFilterLabelsCheckbox(axisId, true); - await visEditor.clickGo(true); + await visEditor.clickGo(); const labels = await visChart.getYAxisLabels(xyChartSelector); const expectedLabels = ['0', '200', '400', '600', '800', '1,000', '1,200', '1,400']; expect(labels).to.eql(expectedLabels); @@ -186,7 +186,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await common.sleep(1003); - await visEditor.clickGo(true); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); const expectedEntries = ['200', '404', '503']; // sorting order aligned with reading direction top-bottom @@ -213,7 +213,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await common.sleep(1003); - await visEditor.clickGo(true); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); const expectedEntries = [ @@ -239,7 +239,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show correct series when disabling first agg', async function () { await visEditor.toggleDisabledAgg(3); - await visEditor.clickGo(true); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); const expectedEntries = ['win 8', 'win xp', 'ios', 'osx', 'win 7']; @@ -258,7 +258,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await common.sleep(1003); - await visEditor.clickGo(true); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); const expectedEntries = ['Derivative of Count']; diff --git a/test/functional/page_objects/visualize_chart_page.ts b/test/functional/page_objects/visualize_chart_page.ts index 9fe9afb32d869..31d33eca7da35 100644 --- a/test/functional/page_objects/visualize_chart_page.ts +++ b/test/functional/page_objects/visualize_chart_page.ts @@ -153,20 +153,17 @@ export class VisualizeChartPageObject extends FtrService { return values.sort((a, b) => a.x - b.x).map(({ y }) => y); } - private async toggleLegend(force = false) { - const isVisTypePieChart = await this.isNewLibraryChart(partitionVisChartSelector); - const legendSelector = force || isVisTypePieChart ? '.echLegend' : '.visLegend'; - + private async toggleLegend() { await this.retry.try(async () => { - const isVisible = await this.find.existsByCssSelector(legendSelector); + const isVisible = await this.find.existsByCssSelector('.echLegend'); if (!isVisible) { await this.testSubjects.click('vislibToggleLegend'); } }); } - public async filterLegend(name: string, force = false) { - await this.toggleLegend(force); + public async filterLegend(name: string) { + await this.toggleLegend(); await this.testSubjects.click(`legend-${name}`); // wait for a short amount of time for popover to stabilize as there is no good way to check for that await this.common.sleep(250); @@ -189,23 +186,13 @@ export class VisualizeChartPageObject extends FtrService { } public async doesSelectedLegendColorExistForPie(matchingColor: string) { - if (await this.isNewLibraryChart(partitionVisChartSelector)) { - const hexMatchingColor = chroma(matchingColor).hex().toUpperCase(); - const slices = - (await this.getEsChartDebugState(partitionVisChartSelector))?.partition?.[0]?.partitions ?? - []; - return slices.some(({ color }) => { - return hexMatchingColor === chroma(color).hex().toUpperCase(); - }); - } - - return await this.testSubjects.exists(`legendSelectedColor-${matchingColor}`); - } - - public async expectError() { - if (!this.isNewLibraryChart(partitionVisChartSelector)) { - await this.testSubjects.existOrFail('vislibVisualizeError'); - } + const hexMatchingColor = chroma(matchingColor).hex().toUpperCase(); + const slices = + (await this.getEsChartDebugState(partitionVisChartSelector))?.partition?.[0]?.partitions ?? + []; + return slices.some(({ color }) => { + return hexMatchingColor === chroma(color).hex().toUpperCase(); + }); } public async getVisualizationRenderingCount() { @@ -305,17 +292,11 @@ export class VisualizeChartPageObject extends FtrService { public async openLegendOptionColorsForPie(name: string, chartSelector: string) { await this.waitForVisualizationRenderingStabilized(); await this.retry.try(async () => { - if (await this.isNewLibraryChart(partitionVisChartSelector)) { - const chart = await this.find.byCssSelector(chartSelector); - const legendItemColor = await chart.findByCssSelector( - `[data-ech-series-name="${name}"] .echLegendItem__color` - ); - await legendItemColor.click(); - } else { - // This click has been flaky in opening the legend, hence the this.retry. See - // https://github.com/elastic/kibana/issues/17468 - await this.testSubjects.click(`legend-${name}`); - } + const chart = await this.find.byCssSelector(chartSelector); + const legendItemColor = await chart.findByCssSelector( + `[data-ech-series-name="${name}"] .echLegendItem__color` + ); + await legendItemColor.click(); await this.waitForVisualizationRenderingStabilized(); // arbitrary color chosen, any available would do diff --git a/test/functional/page_objects/visualize_editor_page.ts b/test/functional/page_objects/visualize_editor_page.ts index 9f9b5cf74be96..95ee763b7de11 100644 --- a/test/functional/page_objects/visualize_editor_page.ts +++ b/test/functional/page_objects/visualize_editor_page.ts @@ -64,8 +64,8 @@ export class VisualizeEditorPageObject extends FtrService { await this.visChart.waitForVisualizationRenderingStabilized(); } - public async clickGo(isNewChartLibrary = false) { - if ((await this.visChart.isNewChartsLibraryEnabled()) || isNewChartLibrary) { + public async clickGo(isLegacyChartLib = false) { + if ((await this.visChart.isNewChartsLibraryEnabled()) || !isLegacyChartLib) { await this.elasticChart.setNewChartUiDebugFlag(); } diff --git a/test/functional/page_objects/visualize_page.ts b/test/functional/page_objects/visualize_page.ts index 1f6c9cc11c474..d565c5168641b 100644 --- a/test/functional/page_objects/visualize_page.ts +++ b/test/functional/page_objects/visualize_page.ts @@ -52,7 +52,7 @@ export class VisualizePageObject extends FtrService { remoteEsPrefix = 'ftr-remote:'; defaultIndexString = 'logstash-*'; - public async initTests(isNewLibrary = false) { + public async initTests(isLegacyChart = false) { await this.kibanaServer.savedObjects.clean({ types: ['visualization'] }); await this.kibanaServer.importExport.load( 'test/functional/fixtures/kbn_archiver/visualize.json' @@ -61,7 +61,7 @@ export class VisualizePageObject extends FtrService { await this.kibanaServer.uiSettings.replace({ defaultIndex: this.defaultIndexString, [FORMATS_UI_SETTINGS.FORMAT_BYTES_DEFAULT_PATTERN]: '0,0.[000]b', - 'visualization:visualize:legacyHeatmapChartsLibrary': !isNewLibrary, + 'visualization:visualize:legacyHeatmapChartsLibrary': isLegacyChart, 'histogram:maxBars': 100, }); } @@ -149,8 +149,8 @@ export class VisualizePageObject extends FtrService { }); } - public async clickRefresh(isNewChartLibrary = false) { - if ((await this.visChart.isNewChartsLibraryEnabled()) || isNewChartLibrary) { + public async clickRefresh(isLegacyChart = false) { + if ((await this.visChart.isNewChartsLibraryEnabled()) || !isLegacyChart) { await this.elasticChart.setNewChartUiDebugFlag(); } await this.queryBar.clickQuerySubmitButton(); @@ -517,14 +517,6 @@ export class VisualizePageObject extends FtrService { await this.testSubjects.click('visualizesaveAndReturnButton'); } - public async getDeprecationWarningStatus() { - if (await this.visChart.isNewChartsLibraryEnabled()) { - await this.testSubjects.missingOrFail('vizDeprecationWarning'); - } else { - await this.testSubjects.existOrFail('vizDeprecationWarning'); - } - } - public async linkedToOriginatingApp() { await this.header.waitUntilLoadingHasFinished(); await this.testSubjects.existOrFail('visualizesaveAndReturnButton'); diff --git a/test/functional/services/visualizations/pie_chart.ts b/test/functional/services/visualizations/pie_chart.ts index d5b1a636d2b2c..f58970b9218ff 100644 --- a/test/functional/services/visualizations/pie_chart.ts +++ b/test/functional/services/visualizations/pie_chart.ts @@ -8,7 +8,6 @@ */ import expect from '@kbn/expect'; -import { isNil } from 'lodash'; import { DebugState } from '@elastic/charts'; import { FtrService } from '../../ftr_provider_context'; @@ -30,36 +29,24 @@ export class PieChartService extends FtrService { async clickOnPieSlice(name?: string) { this.log.debug(`PieChart.clickOnPieSlice(${name})`); - if (await this.visChart.isNewLibraryChart(partitionVisChartSelector)) { - const slices = this.getSlices( - await this.visChart.getEsChartDebugState(partitionVisChartSelector) - ); - let sliceLabel = name || slices[0].name; - if (name === 'Other') { - sliceLabel = '__other__'; - } - const pieSlice = slices.find((slice) => String(slice.name) === sliceLabel); - const pie = await this.testSubjects.find(partitionVisChartSelector); - if (pieSlice) { - const pieSize = await pie.getSize(); - const pieHeight = pieSize.height; - const pieWidth = pieSize.width; - await pie.clickMouseButton({ - xOffset: pieSlice.coords[0] - Math.floor(pieWidth / 2), - yOffset: pieSlice.coords[1] - Math.floor(pieHeight / 2), - }); - } - } else { - if (name) { - await this.testSubjects.click(`pieSlice-${name.split(' ').join('-')}`); - } else { - // If no pie slice has been provided, find the first one available. - await this.retry.try(async () => { - const slices = await this.find.allByCssSelector('svg > g > g.arcs > path.slice'); - this.log.debug('Slices found:' + slices.length); - return slices[0].click(); - }); - } + + const slices = this.getSlices( + await this.visChart.getEsChartDebugState(partitionVisChartSelector) + ); + let sliceLabel = name || slices[0].name; + if (name === 'Other') { + sliceLabel = '__other__'; + } + const pieSlice = slices.find((slice) => String(slice.name) === sliceLabel); + const pie = await this.testSubjects.find(partitionVisChartSelector); + if (pieSlice) { + const pieSize = await pie.getSize(); + const pieHeight = pieSize.height; + const pieWidth = pieSize.width; + await pie.clickMouseButton({ + xOffset: pieSlice.coords[0] - Math.floor(pieWidth / 2), + yOffset: pieSlice.coords[1] - Math.floor(pieHeight / 2), + }); } } @@ -100,12 +87,8 @@ export class PieChartService extends FtrService { async getPieSliceStyle(name: string) { this.log.debug(`VisualizePage.getPieSliceStyle(${name})`); - if (await this.visChart.isNewLibraryChart(partitionVisChartSelector)) { - const selectedSlice = await this.getSelectedSlice(name); - return selectedSlice[0]?.color; - } - const pieSlice = await this.getPieSlice(name); - return await pieSlice.getAttribute('style'); + const selectedSlice = await this.getSelectedSlice(name); + return selectedSlice[0]?.color; } async getAllPieSlicesColors() { @@ -121,27 +104,8 @@ export class PieChartService extends FtrService { async getAllPieSliceColor(name: string) { this.log.debug(`VisualizePage.getAllPieSliceColor(${name})`); - if (await this.visChart.isNewLibraryChart(partitionVisChartSelector)) { - const selectedSlice = await this.getSelectedSlice(name); - return selectedSlice.map((slice) => slice.color); - } - const pieSlices = await this.getAllPieSlices(name); - const slicesStyles = await Promise.all( - pieSlices.map(async (pieSlice) => (await pieSlice.getAttribute('style')) ?? '') - ); - return slicesStyles - .map( - (styles) => - styles.split(';').reduce>((styleAsObj, style) => { - const stylePair = style.split(':'); - if (stylePair.length !== 2) { - return styleAsObj; - } - styleAsObj[stylePair[0].trim()] = stylePair[1].trim(); - return styleAsObj; - }, {}).fill // in vislib the color is available on the `fill` style prop - ) - .filter((d) => !isNil(d)); + const selectedSlice = await this.getSelectedSlice(name); + return selectedSlice.map((slice) => slice.color); } async getPieChartData() { @@ -155,57 +119,41 @@ export class PieChartService extends FtrService { await this.inspector.expectTableData(expectedTableData); } - async getPieChartLabels(isNewLibrary: boolean = true) { - if (isNewLibrary) { - const slices = this.getSlices( - await this.visChart.getEsChartDebugState(partitionVisChartSelector) - ); - return slices.map((slice) => { - if (slice.name === '__missing__') { - return 'Missing'; - } else if (slice.name === '__other__') { - return 'Other'; - } else if (typeof slice.name === 'number') { - // debugState of escharts returns the numbers without comma - const val = slice.name as number; - return val.toString().replace(/\B(? await chart.getAttribute('data-label')) + async getPieChartLabels() { + const slices = this.getSlices( + await this.visChart.getEsChartDebugState(partitionVisChartSelector) ); + return slices.map((slice) => { + if (slice.name === '__missing__') { + return 'Missing'; + } else if (slice.name === '__other__') { + return 'Other'; + } else if (typeof slice.name === 'number') { + // debugState of escharts returns the numbers without comma + const val = slice.name as number; + return val.toString().replace(/\B(? { - return slice.value; - }); - } - const chartTypes = await this.find.allByCssSelector('path.slice', this.defaultFindTimeout * 2); - return await Promise.all( - chartTypes.map(async (chart) => await chart.getAttribute('data-value')) + const slices = this.getSlices( + await this.visChart.getEsChartDebugState(partitionVisChartSelector) ); + return slices.map((slice) => { + return slice.value; + }); } - async getPieSliceCount(isNewLibrary: boolean = true) { + async getPieSliceCount() { this.log.debug('PieChart.getPieSliceCount'); - if (isNewLibrary) { - const slices = this.getSlices( - await this.visChart.getEsChartDebugState(partitionVisChartSelector) - ); - return slices?.length; - } - const slices = await this.find.allByCssSelector('svg > g > g.arcs > path.slice'); - return slices.length; + const slices = this.getSlices( + await this.visChart.getEsChartDebugState(partitionVisChartSelector) + ); + return slices?.length; } async getSliceCountForAllPies() { @@ -234,10 +182,10 @@ export class PieChartService extends FtrService { expect(slices.length).to.be(expectedCount); } - async expectPieSliceCount(expectedCount: number, isNewLibrary: boolean = true) { + async expectPieSliceCount(expectedCount: number) { this.log.debug(`PieChart.expectPieSliceCount(${expectedCount})`); await this.retry.try(async () => { - const slicesCount = await this.getPieSliceCount(isNewLibrary); + const slicesCount = await this.getPieSliceCount(); expect(slicesCount).to.be(expectedCount); }); } @@ -254,10 +202,10 @@ export class PieChartService extends FtrService { expect(noResult).to.be(true); } - async expectPieChartLabels(expectedLabels: string[], isNewLibrary: boolean = true) { + async expectPieChartLabels(expectedLabels: string[]) { this.log.debug(`PieChart.expectPieChartLabels(${expectedLabels.join(',')})`); await this.retry.try(async () => { - const pieData = await this.getPieChartLabels(isNewLibrary); + const pieData = await this.getPieChartLabels(); expect(pieData.sort()).to.eql(expectedLabels); }); } diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts index 8a0cd091bb85d..2d302bd7b7466 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts @@ -22,10 +22,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const elasticChart = getService('elasticChart'); describe('Gauge', function describeIndexTests() { - const isNewChartsLibraryEnabled = true; - before(async () => { - await visualize.initTests(isNewChartsLibraryEnabled); + await visualize.initTests(); }); beforeEach(async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/goal.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/goal.ts index 9d547f60c3def..89d08c0abeb16 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/goal.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/goal.ts @@ -20,10 +20,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); describe('Goal', function describeIndexTests() { - const isNewChartsLibraryEnabled = true; - before(async () => { - await visualize.initTests(isNewChartsLibraryEnabled); + await visualize.initTests(); }); beforeEach(async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts index dbc02a11c9c80..0f30e21942734 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts @@ -18,10 +18,8 @@ export default function ({ getPageObjects }: FtrProviderContext) { ]); describe('Heatmap', function describeIndexTests() { - const isNewChartsLibraryEnabled = true; - before(async () => { - await visualize.initTests(isNewChartsLibraryEnabled); + await visualize.initTests(); }); beforeEach(async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/metric.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/metric.ts index 8d966bf24e7a2..0ff670848d47b 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/metric.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/metric.ts @@ -21,10 +21,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const find = getService('find'); describe('Metric', function describeIndexTests() { - const isNewChartsLibraryEnabled = true; - before(async () => { - await visualize.initTests(isNewChartsLibraryEnabled); + await visualize.initTests(); }); beforeEach(async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/pie.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/pie.ts index 5d075a5bca88b..785c1706ffbeb 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/pie.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/pie.ts @@ -21,10 +21,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); describe('Pie', function describeIndexTests() { - const isNewChartsLibraryEnabled = true; - before(async () => { - await visualize.initTests(isNewChartsLibraryEnabled); + await visualize.initTests(); }); beforeEach(async () => { @@ -60,7 +58,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.selectAggregation('Terms'); await visEditor.selectField('machine.os.raw'); await header.waitUntilLoadingHasFinished(); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); expect(await visualize.hasNavigateToLensButton()).to.eql(true); }); @@ -94,7 +92,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.clickBucket('Split slices'); await visEditor.selectAggregation('Terms'); await visEditor.selectField('machine.os.raw'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); @@ -108,7 +106,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(sliceByText).to.be('machine.os.raw: Descending'); expect(sizeByText).to.be('Count'); - await pieChart.expectPieChartLabels(expectedTableData, isNewChartsLibraryEnabled); + await pieChart.expectPieChartLabels(expectedTableData); }); it('should convert types correctly', async () => { @@ -116,7 +114,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.selectAggregation('Terms'); await visEditor.selectField('machine.os.raw'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); @@ -133,7 +131,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.clickOptionsTab(); const isDonutButton = await testSubjects.find('visTypePieIsDonut'); await isDonutButton.click(); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/table.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/table.ts index 56a4ad07285f5..380f58f2ea8bb 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/table.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/table.ts @@ -21,10 +21,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const comboBox = getService('comboBox'); describe('Table', function describeIndexTests() { - const isNewChartsLibraryEnabled = true; - before(async () => { - await visualize.initTests(isNewChartsLibraryEnabled); + await visualize.initTests(); }); beforeEach(async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/xy.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/xy.ts index c615bb9a1b52f..d417129b58f9f 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/xy.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/xy.ts @@ -22,10 +22,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const retry = getService('retry'); describe('XY', function describeIndexTests() { - const isNewChartsLibraryEnabled = true; - before(async () => { - await visualize.initTests(isNewChartsLibraryEnabled); + await visualize.initTests(); }); beforeEach(async () => { @@ -43,7 +41,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.clickBucket('Dot size', 'metrics'); await visEditor.selectAggregation('Max', 'metrics'); await visEditor.selectField('memory', 'metrics'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); expect(await visualize.hasNavigateToLensButton()).to.eql(false); }); @@ -52,7 +50,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.clickBucket('Split chart'); await visEditor.selectAggregation('Terms'); await visEditor.selectField('machine.os.raw'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); expect(await visualize.hasNavigateToLensButton()).to.eql(false); }); @@ -69,7 +67,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.selectYAxisPosition('ValueAxis-1', 'left'); await visEditor.clickYAxisOptions('ValueAxis-2'); await visEditor.selectYAxisPosition('ValueAxis-2', 'left'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); expect(await visualize.hasNavigateToLensButton()).to.eql(false); }); @@ -80,7 +78,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.selectField('machine.os.raw'); await visEditor.clickBucket('Split series'); await visEditor.selectAggregation('Date histogram', 'buckets', false, 1); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); expect(await visualize.hasNavigateToLensButton()).to.eql(false); }); @@ -91,7 +89,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.clickBucket('Split series'); await visEditor.selectAggregation('Terms'); await visEditor.selectField('machine.os.raw'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); expect(await visualize.hasNavigateToLensButton()).to.eql(false); }); @@ -101,7 +99,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.selectAggregation('Serial diff', 'metrics'); await visEditor.clickBucket('Split series'); await visEditor.selectAggregation('Date histogram'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); const button = await testSubjects.exists('visualizeEditInLensButton'); expect(button).to.eql(false); @@ -116,7 +114,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.setSeriesType(0, 'area'); await visEditor.toggleAccordion('visEditorSeriesAccordion2'); await visEditor.setSeriesType(1, 'histogram'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); await lens.waitForVisualization('xyVisChart'); @@ -143,7 +141,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.setSeriesType(0, 'histogram'); await visEditor.toggleAccordion('visEditorSeriesAccordion2'); await visEditor.setSeriesType(1, 'histogram'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); await lens.waitForVisualization('xyVisChart'); @@ -165,7 +163,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.selectAggregation('Cumulative sum', 'metrics'); await visEditor.clickBucket('Split series'); await visEditor.selectAggregation('Date histogram'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); await lens.waitForVisualization('xyVisChart'); @@ -182,7 +180,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('should convert sibling pipeline aggregation', async () => { await visEditor.clickMetricEditor(); await visEditor.selectAggregation('Max Bucket', 'metrics'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); @@ -204,7 +202,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('should draw a reference line', async () => { await visEditor.clickOptionsTab(); await visEditor.toggleShowThresholdLine(); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); const line = await visChart.getReferenceLine('xyVisChart'); expect(line?.length).to.be(1); await header.waitUntilLoadingHasFinished(); @@ -229,7 +227,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.toggleAccordion('visEditorSeriesAccordion1'); await visEditor.setSeriesType(0, 'line'); await visEditor.selectChartMode('stacked'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); @@ -249,7 +247,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.selectChartMode('normal'); await visEditor.clickYAxisOptions('ValueAxis-1'); await visEditor.selectYAxisMode('percentage'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); @@ -268,7 +266,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.setSeriesType(0, 'histogram'); await visEditor.clickYAxisOptions('ValueAxis-1'); await visEditor.selectYAxisPosition('ValueAxis-1', 'top'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); @@ -294,7 +292,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.selectYAxisPosition('ValueAxis-1', 'left'); await visEditor.clickYAxisOptions('ValueAxis-2'); await visEditor.selectYAxisPosition('ValueAxis-2', 'right'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); await visualize.navigateToLensFromAnotherVisualization(); @@ -322,7 +320,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.selectAggregation('Terms'); await visEditor.selectField('machine.os.raw'); await header.waitUntilLoadingHasFinished(); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); const expectedData = await visChart.getLegendEntriesXYCharts('xyVisChart'); await visualize.navigateToLensFromAnotherVisualization(); @@ -344,7 +342,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await visEditor.clickBucket('X-axis'); await visEditor.selectAggregation('Terms'); await visEditor.selectField('machine.os.raw'); - await visEditor.clickGo(isNewChartsLibraryEnabled); + await visEditor.clickGo(); await header.waitUntilLoadingHasFinished(); const expectedData = await visChart.getLegendEntriesXYCharts('xyVisChart'); await visualize.navigateToLensFromAnotherVisualization();