From a81748ecf0328897bfa9d94f9d5050938bf1bea5 Mon Sep 17 00:00:00 2001 From: Lene Gadewoll Date: Thu, 18 Apr 2024 23:15:15 +0200 Subject: [PATCH] test(EuiComboBox): update input options placement --- src/components/combo_box/combo_box.test.tsx | 49 ++++++++++++++------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/src/components/combo_box/combo_box.test.tsx b/src/components/combo_box/combo_box.test.tsx index 10643adf2cc3..34e9d3ddea31 100644 --- a/src/components/combo_box/combo_box.test.tsx +++ b/src/components/combo_box/combo_box.test.tsx @@ -223,24 +223,24 @@ describe('EuiComboBox', () => { }); describe('toolTipContent & tooltipProps', () => { - const options = [ - { - label: 'Titan', - 'data-test-subj': 'titanOption', - toolTipContent: 'I am a tooltip!', - toolTipProps: { - 'data-test-subj': 'optionToolTip', + it('renders a tooltip with applied props on mouseover', async () => { + const options = [ + { + label: 'Titan', + 'data-test-subj': 'titanOption', + toolTipContent: 'I am a tooltip!', + toolTipProps: { + 'data-test-subj': 'optionToolTip', + }, }, - }, - { - label: 'Enceladus', - }, - { - label: 'Mimas', - }, - ]; + { + label: 'Enceladus', + }, + { + label: 'Mimas', + }, + ]; - it('renders a tooltip with applied props on mouseover', async () => { const { getByTestSubject } = render(); await showEuiComboBoxOptions(); @@ -255,6 +255,23 @@ describe('EuiComboBox', () => { }); it('renders a tooltip with applied props on focus', async () => { + const options = [ + { + label: 'Titan', + 'data-test-subj': 'titanOption', + toolTipContent: 'I am a tooltip!', + toolTipProps: { + 'data-test-subj': 'optionToolTip', + }, + }, + { + label: 'Enceladus', + }, + { + label: 'Mimas', + }, + ]; + const { getByTestSubject } = render(); await showEuiComboBoxOptions();