Skip to content

Commit

Permalink
Added delay to fix a test
Browse files Browse the repository at this point in the history
  • Loading branch information
igoristic committed Jul 23, 2020
1 parent ddbdad0 commit 2216464
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions x-pack/test/functional/apps/monitoring/time_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import expect from '@kbn/expect';
import { getLifecycleMethods } from './_get_lifecycle_methods';

const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

export default function ({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['header', 'timePicker']);
const testSubjects = getService('testSubjects');
Expand Down Expand Up @@ -35,6 +37,11 @@ export default function ({ getService, getPageObjects }) {
});

it('should send another request when changing the time picker', async () => {
/**
* TODO: The value should either be removed or lowered after:
* https://github.com/elastic/kibana/issues/72997 is resolved
*/
await delay(3000);
await PageObjects.timePicker.setAbsoluteRange(
'Aug 15, 2016 @ 21:00:00.000',
'Aug 16, 2016 @ 00:00:00.000'
Expand Down

0 comments on commit 2216464

Please sign in to comment.