Skip to content

Commit

Permalink
update functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelolo24 committed Jan 4, 2021
1 parent 5e82862 commit de1a986
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions x-pack/test/plugin_functional/test_suites/resolver/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { delay } from 'bluebird';
import expect from '@kbn/expect';
import { WebElementWrapper } from '../../../../../test/functional/services/lib/web_element_wrapper';

import { FtrProviderContext } from '../../ftr_provider_context';
import { panAnimationDuration } from '../../../../plugins/security_solution/public/resolver/store/camera/scaling_constants';

const expectedDifference = 0.09;

const waitForPanAnimationToFinish = () =>
new Promise((resolve) => setTimeout(resolve, panAnimationDuration + 1));

export default function ({
getPageObjects,
getService,
Expand All @@ -21,7 +24,6 @@ export default function ({
const screenshot = getService('screenshots');
const find = getService('find');
const browser = getService('browser');
const panningDuration = 1000;

describe('Resolver test app', function () {
this.tags('ciGroup7');
Expand Down Expand Up @@ -105,7 +107,7 @@ export default function ({
// select the node
await button.click();
// Wait for the pan to center the node
await delay(panningDuration);
await waitForPanAnimationToFinish();
});
it('should render as expected', async () => {
expect(
Expand Down Expand Up @@ -160,7 +162,7 @@ export default function ({
await (await firstPill()).click();

// Wait for the pan to center the node
await delay(panningDuration);
await waitForPanAnimationToFinish();
});
it('should render as expected', async () => {
expect(
Expand Down

0 comments on commit de1a986

Please sign in to comment.