Skip to content

Commit 2290a1c

Browse files
committed
Sibling pipeline aggregation test added.
1 parent 5a7a6f1 commit 2290a1c

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

  • x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based

x-pack/test/functional/apps/lens/group3/open_in_lens/agg_based/metric.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,34 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
8282
},
8383
]);
8484
});
85+
86+
it('should convert sibling pipeline aggregation', async () => {
87+
await visEditor.clickMetricEditor();
88+
await visEditor.selectAggregation('Max Bucket', 'metrics');
89+
await visEditor.clickGo();
90+
91+
const button = await testSubjects.find('visualizeEditInLensButton');
92+
await button.click();
93+
await lens.waitForVisualization('mtrVis');
94+
95+
expect(await lens.getLayerCount()).to.be(1);
96+
97+
const dimensions = await testSubjects.findAll('lns-dimensionTrigger');
98+
expect(dimensions).to.have.length(2);
99+
expect(await dimensions[0].getVisibleText()).to.be('Overall Max of Count');
100+
expect(await dimensions[1].getVisibleText()).to.be('@timestamp');
101+
102+
expect((await lens.getMetricVisualizationData()).length).to.be.equal(1);
103+
expect(await lens.getMetricVisualizationData()).to.eql([
104+
{
105+
title: 'Overall Max of Count',
106+
subtitle: undefined,
107+
extraText: '',
108+
value: '1.44K',
109+
color: 'rgba(245, 247, 250, 1)',
110+
showingBar: false,
111+
},
112+
]);
113+
});
85114
});
86115
}

0 commit comments

Comments
 (0)