Skip to content

Commit

Permalink
extend functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Apr 2, 2020
1 parent f4959fd commit b3c38df
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion test/functional/apps/visualize/_vertical_bar_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,32 @@ export default function({ getService, getPageObjects }) {
await PageObjects.visEditor.selectXAxisPosition('left');
await PageObjects.visEditor.clickGo();

const leftLabels = await PageObjects.visChart.getXAxisLabels();
// the getYAxisLabels helper always returns the labels on the left axis
const leftLabels = await PageObjects.visChart.getYAxisLabels();
log.debug(`${leftLabels.length} tick labels on left x axis`);
expect(leftLabels.length).to.be.greaterThan(bottomLabels.length * (2 / 3));
});

it('should not filter out first label after rotation of the chart', async function() {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickVerticalBarChart();
await PageObjects.visualize.clickNewSearch();
await PageObjects.timePicker.setDefaultAbsoluteRange();
await PageObjects.visEditor.clickBucket('X-axis');
await PageObjects.visEditor.selectAggregation('Date Range');
await PageObjects.visEditor.selectField('@timestamp');
await PageObjects.visEditor.clickGo();
const bottomLabels = await PageObjects.visChart.getXAxisLabels();
expect(bottomLabels.length).to.be(1);

await PageObjects.visEditor.clickMetricsAndAxes();
await PageObjects.visEditor.selectXAxisPosition('left');
await PageObjects.visEditor.clickGo();

// the getYAxisLabels helper always returns the labels on the left axis
const leftLabels = await PageObjects.visChart.getYAxisLabels();
expect(leftLabels.length).to.be(1);
});
});

// FLAKY: https://github.com/elastic/kibana/issues/22322
Expand Down

0 comments on commit b3c38df

Please sign in to comment.