Skip to content

Commit

Permalink
Add scroll into view to avoid tooltip overlap (#47106)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
markov00 authored Oct 3, 2019
1 parent ea18949 commit 802cd33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/functional/apps/visualize/_vertical_bar_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function ({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['common', 'visualize', 'header', 'timePicker']);

// FLAKY: https://github.com/elastic/kibana/issues/22322
describe.skip('vertical bar chart', function () {
describe('vertical bar chart', function () {
const fromTime = '2015-09-19 06:31:44.000';
const toTime = '2015-09-23 18:31:44.000';
const vizName1 = 'Visualization VerticalBarChart';
Expand Down Expand Up @@ -278,8 +278,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 () {
Expand All @@ -306,6 +305,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();

Expand Down
5 changes: 5 additions & 0 deletions test/functional/page_objects/visualize_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 802cd33

Please sign in to comment.