Skip to content

Commit

Permalink
Add scroll into view to avoid tooltip overlap (#47106) (#47202)
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 committed Oct 4, 2019
1 parent 382f6fc commit 323165b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/functional/apps/visualize/_vertical_bar_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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();

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 323165b

Please sign in to comment.