Skip to content

Commit

Permalink
[QA][refactor] Use ui settings - saved queries
Browse files Browse the repository at this point in the history
Use ui settings instead of setting absolute range
for timepicker.

Stack this pr on top of:
#114530

...to use the new common page time fns.
  • Loading branch information
wayneseymour committed Oct 19, 2021
1 parent 5a0002f commit 5b2f0dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/functional/apps/discover/_saved_queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
};
Expand All @@ -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', () => {
Expand Down

0 comments on commit 5b2f0dc

Please sign in to comment.