Skip to content

Commit

Permalink
Unskip vislib tests (elastic#71452)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Jul 22, 2020
1 parent a93c327 commit 1810dd1
Show file tree
Hide file tree
Showing 7 changed files with 493 additions and 638 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function ValueAxisOptions({

<LabelOptions
axisLabels={axis.labels}
axisFilterCheckboxName={`yAxisFilterLabelsCheckbox${axis.id}`}
axisFilterCheckboxName={`yAxisFilterLabelsCheckbox-${axis.id}`}
setAxisLabel={setAxisLabel}
/>
</>
Expand Down
62 changes: 15 additions & 47 deletions test/functional/apps/visualize/_area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export default function ({ getService, getPageObjects }) {
});
});

describe.skip('switch between Y axis scale types', () => {
describe('switch between Y axis scale types', () => {
before(initAreaChart);
const axisId = 'ValueAxis-1';

Expand All @@ -308,57 +308,25 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
await PageObjects.visEditor.clickGo();
const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
'5',
'7',
'10',
'20',
'30',
'50',
'70',
'100',
'200',
'300',
'500',
'700',
'1,000',
'2,000',
'3,000',
'5,000',
'7,000',
];
expect(labels).to.eql(expectedLabels);
const labels = await PageObjects.visChart.getYAxisLabelsAsNumbers();
const minLabel = 2;
const maxLabel = 5000;
const numberOfLabels = 10;
expect(labels.length).to.be.greaterThan(numberOfLabels);
expect(labels[0]).to.eql(minLabel);
expect(labels[labels.length - 1]).to.be.greaterThan(maxLabel);
});

it('should show filtered ticks on selecting log scale', async () => {
await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
await PageObjects.visEditor.clickGo();
const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
'5',
'7',
'10',
'20',
'30',
'50',
'70',
'100',
'200',
'300',
'500',
'700',
'1,000',
'2,000',
'3,000',
'5,000',
'7,000',
];
expect(labels).to.eql(expectedLabels);
const labels = await PageObjects.visChart.getYAxisLabelsAsNumbers();
const minLabel = 2;
const maxLabel = 5000;
const numberOfLabels = 10;
expect(labels.length).to.be.greaterThan(numberOfLabels);
expect(labels[0]).to.eql(minLabel);
expect(labels[labels.length - 1]).to.be.greaterThan(maxLabel);
});

it('should show ticks on selecting square root scale', async () => {
Expand Down
62 changes: 15 additions & 47 deletions test/functional/apps/visualize/_line_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visChart.waitForVisualization();
});

describe.skip('switch between Y axis scale types', () => {
describe('switch between Y axis scale types', () => {
before(initLineChart);
const axisId = 'ValueAxis-1';

Expand All @@ -191,57 +191,25 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visEditor.selectYAxisScaleType(axisId, 'log');
await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
await PageObjects.visEditor.clickGo();
const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
'5',
'7',
'10',
'20',
'30',
'50',
'70',
'100',
'200',
'300',
'500',
'700',
'1,000',
'2,000',
'3,000',
'5,000',
'7,000',
];
expect(labels).to.eql(expectedLabels);
const labels = await PageObjects.visChart.getYAxisLabelsAsNumbers();
const minLabel = 2;
const maxLabel = 5000;
const numberOfLabels = 10;
expect(labels.length).to.be.greaterThan(numberOfLabels);
expect(labels[0]).to.eql(minLabel);
expect(labels[labels.length - 1]).to.be.greaterThan(maxLabel);
});

it('should show filtered ticks on selecting log scale', async () => {
await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, true);
await PageObjects.visEditor.clickGo();
const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = [
'2',
'3',
'5',
'7',
'10',
'20',
'30',
'50',
'70',
'100',
'200',
'300',
'500',
'700',
'1,000',
'2,000',
'3,000',
'5,000',
'7,000',
];
expect(labels).to.eql(expectedLabels);
const labels = await PageObjects.visChart.getYAxisLabelsAsNumbers();
const minLabel = 2;
const maxLabel = 5000;
const numberOfLabels = 10;
expect(labels.length).to.be.greaterThan(numberOfLabels);
expect(labels[0]).to.eql(minLabel);
expect(labels[labels.length - 1]).to.be.greaterThan(maxLabel);
});

it('should show ticks on selecting square root scale', async () => {
Expand Down
Loading

0 comments on commit 1810dd1

Please sign in to comment.