From e0e898473184d9bccf50029ae1fbd42ac1d28c76 Mon Sep 17 00:00:00 2001 From: Yaroslav Kuznietsov Date: Tue, 27 Sep 2022 16:49:12 +0300 Subject: [PATCH] Added functional tests for converting to Lens. --- .../functional/apps/lens/group3/tsvb_open_in_lens.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/x-pack/test/functional/apps/lens/group3/tsvb_open_in_lens.ts b/x-pack/test/functional/apps/lens/group3/tsvb_open_in_lens.ts index e72404bb3264d..173ab1c4fdf04 100644 --- a/x-pack/test/functional/apps/lens/group3/tsvb_open_in_lens.ts +++ b/x-pack/test/functional/apps/lens/group3/tsvb_open_in_lens.ts @@ -106,6 +106,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const button = await testSubjects.exists('visualizeEditInLensButton'); expect(button).to.eql(true); }); + + it('should convert to Lens', async () => { + const button = await testSubjects.find('visualizeEditInLensButton'); + await button.click(); + await lens.waitForVisualization('mtrVis'); + + const metricData = await lens.getMetricVisualizationData(); + expect(metricData[0].title).to.eql('Count of records'); + }); }); describe('Dashboard to TSVB to Lens', () => {