Skip to content

Commit

Permalink
👌 Integrated review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Dec 28, 2020
1 parent ea276aa commit 0d5b6c4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
3 changes: 3 additions & 0 deletions x-pack/test/functional/apps/lens/chart_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
assertMatchesExpectedData(data!);
});

// Partition chart tests have to be skipped until
// https://github.com/elastic/elastic-charts/issues/917 gets fixed
it.skip('should render pie chart', async () => {
await PageObjects.lens.switchToVisualization('pie');
await PageObjects.header.waitUntilLoadingHasFinished();
Expand All @@ -78,6 +80,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const data = await PageObjects.lens.getCurrentChartDebugState();
assertMatchesExpectedData(data!);
});

it('should render datatable', async () => {
await PageObjects.lens.switchToVisualization('lnsDatatable');
await PageObjects.header.waitUntilLoadingHasFinished();
Expand Down
39 changes: 18 additions & 21 deletions x-pack/test/functional/apps/lens/smokescreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,32 +223,31 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

await PageObjects.lens.closeDimensionEditor();

await retry.tryForTime(3000, async () => {
const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.axes?.y.length).to.eql(2);
expect(data?.axes?.y.some(({ position }) => position === 'right')).to.eql(true);
});
await PageObjects.header.waitUntilLoadingHasFinished();

const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.axes?.y.length).to.eql(2);
expect(data?.axes?.y.some(({ position }) => position === 'right')).to.eql(true);
});

it('should show value labels on bar charts when enabled', async () => {
// enable value labels
await PageObjects.lens.toggleToolbarPopover('lnsValuesButton');
await testSubjects.click('lnsXY_valueLabels_inside');

await PageObjects.header.waitUntilLoadingHasFinished();

// check for value labels
await retry.tryForTime(3000, async () => {
const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.bars?.[0].labels).not.to.eql(0);
});
const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.bars?.[0].labels).not.to.eql(0);

// switch to stacked bar chart
await PageObjects.lens.switchToVisualization('bar_stacked');
await PageObjects.header.waitUntilLoadingHasFinished();

// check for value labels
await retry.tryForTime(3000, async () => {
const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.bars?.[0].labels.length).to.eql(0);
});
const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.bars?.[0].labels.length).to.eql(0);
});

it('should override axis title', async () => {
Expand All @@ -257,19 +256,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await testSubjects.setValue('lnsyLeftAxisTitle', axisTitle, {
clearWithKeyboard: true,
});
await PageObjects.header.waitUntilLoadingHasFinished();

await retry.tryForTime(3000, async () => {
const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.axes?.y?.[0].title).to.eql(axisTitle);
});
const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.axes?.y?.[0].title).to.eql(axisTitle);

// hide the gridlines
await testSubjects.click('lnsshowyLeftAxisGridlines');
await PageObjects.header.waitUntilLoadingHasFinished();

await retry.tryForTime(3000, async () => {
const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.axes?.y?.[0].gridlines.length).to.eql(0);
});
const data = await PageObjects.lens.getCurrentChartDebugState();
expect(data?.axes?.y?.[0].gridlines.length).to.eql(0);
});

it('should transition from a multi-layer stacked bar to donut chart using suggestions', async () => {
Expand Down

0 comments on commit 0d5b6c4

Please sign in to comment.