Skip to content

Commit

Permalink
Increase tooltip timeout from 250ms to 300ms for tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Aug 10, 2020
1 parent 152f41c commit b73e68b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ describe('FieldTitleBar', () => {
expect(wrapper.find('EuiToolTip').children()).toHaveLength(1);

container.simulate('mouseover');
// EuiToolTip mounts children after a 250ms delay
// EuiToolTip mounts children after a 250ms delay,
// thus using a 300ms delay to avoid flakyness.
setTimeout(() => {
wrapper.update();
expect(wrapper.find('EuiToolTip').children()).toHaveLength(2);
container.simulate('mouseout');
wrapper.update();
expect(wrapper.find('EuiToolTip').children()).toHaveLength(1);
done();
}, 250);
}, 300);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ describe('FieldTypeIcon', () => {
expect(typeIconComponent.find('EuiToolTip').children()).toHaveLength(1);

container.simulate('mouseover');
// EuiToolTip mounts children after a 250ms delay
setTimeout(() => expect(typeIconComponent.find('EuiToolTip').children()).toHaveLength(2), 250);
// EuiToolTip mounts children after a 250ms delay,
// thus using a 300ms delay to avoid flakyness.
setTimeout(() => expect(typeIconComponent.find('EuiToolTip').children()).toHaveLength(2), 300);

container.simulate('mouseout');
expect(typeIconComponent.find('EuiToolTip').children()).toHaveLength(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,12 @@ describe('Configuration button', () => {
);

newWrapper.find('[data-test-subj="configure-case-button"]').first().simulate('mouseOver');
// EuiToolTip mounts children after a 250ms delay
// EuiToolTip mounts children after a 250ms delay,
// thus using a 300ms delay to avoid flakyness.
setTimeout(
() =>
expect(newWrapper.find('.euiToolTipPopover').text()).toBe(`${titleTooltip}${msgTooltip}`),
250
300
);
});
});

0 comments on commit b73e68b

Please sign in to comment.