From f1ff1dda11ba0ba43d344fd880f101d650152624 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 20 Oct 2021 08:25:11 -0400 Subject: [PATCH] [QA][refactor] Use ui settings - saved queries (#114820) (#115723) Co-authored-by: Tre --- test/functional/apps/discover/_saved_queries.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/functional/apps/discover/_saved_queries.ts b/test/functional/apps/discover/_saved_queries.ts index 832d895fcea3..b7d19807e563 100644 --- a/test/functional/apps/discover/_saved_queries.ts +++ b/test/functional/apps/discover/_saved_queries.ts @@ -28,9 +28,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const setUpQueriesWithFilters = async () => { // set up a query with filters and a time filter log.debug('set up a query with filters to save'); - const fromTime = 'Sep 20, 2015 @ 08:00:00.000'; - const toTime = 'Sep 21, 2015 @ 08:00:00.000'; - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); + const from = 'Sep 20, 2015 @ 08:00:00.000'; + const to = 'Sep 21, 2015 @ 08:00:00.000'; + await PageObjects.common.setTime({ from, to }); + await PageObjects.common.navigateToApp('discover'); await filterBar.addFilter('extension.raw', 'is one of', 'jpg'); await queryBar.setQuery('response:200'); }; @@ -54,6 +55,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); await esArchiver.unload('test/functional/fixtures/es_archiver/date_nested'); await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); + await PageObjects.common.unsetTime(); }); describe('saved query selection', () => {