From c1ba94eda1e653bc9b6af211f12acef1e574b313 Mon Sep 17 00:00:00 2001 From: Maja Grubic Date: Wed, 13 Oct 2021 18:59:03 +0200 Subject: [PATCH] Add a functional test --- test/functional/apps/discover/_chart_hidden.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/functional/apps/discover/_chart_hidden.ts b/test/functional/apps/discover/_chart_hidden.ts index be948bd5940cf..2888060eae678 100644 --- a/test/functional/apps/discover/_chart_hidden.ts +++ b/test/functional/apps/discover/_chart_hidden.ts @@ -54,7 +54,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('persists hidden chart option on the saved search ', async function () { - await PageObjects.discover.saveSearch('chart hidden yyy'); + const savedSearchTitle = 'chart hidden'; + await PageObjects.discover.saveSearch(savedSearchTitle); await PageObjects.discover.toggleChartVisibility(); expect(await PageObjects.discover.isChartVisible()).to.be(true); @@ -64,7 +65,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.header.waitUntilLoadingHasFinished(); expect(await PageObjects.discover.isChartVisible()).to.be(true); - await PageObjects.discover.loadSavedSearch('chart hidden yyy'); + await PageObjects.discover.loadSavedSearch(savedSearchTitle); expect(await PageObjects.discover.isChartVisible()).to.be(false); }); });