Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.9] Unskip vislib tests (#71452) #73203

Merged
merged 2 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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