From 323165b77805f6a6260a08be59f7dbd53b8a0623 Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Fri, 4 Oct 2019 09:16:37 +0200 Subject: [PATCH] Add scroll into view to avoid tooltip overlap (#47106) (#47202) The current angular implementation of the tooltip, applied to the Apply button of the visualize editor, suffer from missing the mouseleave event in some cases. This cause the tooltip to remain open in some cases halting the test from clicking the underlying button. The tooltip implementation will be soon replaced by EUI, so on this PR we are only unskipping the test and scrolling the visualize editor sidebar to avoid this overlap. --- test/functional/apps/visualize/_vertical_bar_chart.js | 5 +++-- test/functional/page_objects/visualize_page.js | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/functional/apps/visualize/_vertical_bar_chart.js b/test/functional/apps/visualize/_vertical_bar_chart.js index e9ae79be0ffe8c..08bd6b819ab882 100644 --- a/test/functional/apps/visualize/_vertical_bar_chart.js +++ b/test/functional/apps/visualize/_vertical_bar_chart.js @@ -277,8 +277,7 @@ export default function ({ getService, getPageObjects }) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/45105 - describe.skip('vertical bar with multiple splits', function () { + describe('vertical bar with multiple splits', function () { before(initBarChart); it('should show correct series', async function () { @@ -305,6 +304,8 @@ export default function ({ getService, getPageObjects }) { }); it('should show correct series when disabling first agg', async function () { + // this will avoid issues with the play tooltip covering the disable agg button + await PageObjects.visualize.scrollSubjectIntoView('metricsAggGroup'); await PageObjects.visualize.toggleDisabledAgg(3); await PageObjects.visualize.clickGo(); diff --git a/test/functional/page_objects/visualize_page.js b/test/functional/page_objects/visualize_page.js index 6d403ce2dd4a68..e40ce93dd54011 100644 --- a/test/functional/page_objects/visualize_page.js +++ b/test/functional/page_objects/visualize_page.js @@ -1259,6 +1259,11 @@ export function VisualizePageProvider({ getService, getPageObjects, updateBaseli const inputMax = await control.findByCssSelector('[name$="maxValue"]'); await inputMax.type(max); } + + async scrollSubjectIntoView(subject) { + const element = await testSubjects.find(subject); + await element.scrollIntoViewIfNecessary(); + } } return new VisualizePage();