+ - Clicking this button will toggle a popover dialog.
+
+
-
-
-
+ …
+
+
+
+ - Clicking this button will toggle a popover dialog.
+
+
-
-
-
+ - Clicking this button will toggle a popover dialog.
+
+
-
-
-
+ - Clicking this button will toggle a popover dialog.
+
+
-
-
-
+ …
+
+
+
+ - Clicking this button will toggle a popover dialog.
+
+
-
-
-
+ - Clicking this button will toggle a popover dialog.
+
+
-
-
-
+ - Clicking this button will toggle a popover dialog.
+
+
-
-
-
+
+
-
-
-
+
+
-
-
-
-
-
+
+
+
`;
diff --git a/src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_item.test.tsx.snap b/src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_item.test.tsx.snap
index d930c29eb00..995c41af0b3 100644
--- a/src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_item.test.tsx.snap
+++ b/src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_item.test.tsx.snap
@@ -2,30 +2,26 @@
exports[`EuiCollapsedNavItem renders a popover if items exist 1`] = `
-
-
-
-
-
+
+
+
`;
diff --git a/src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_popover.test.tsx.snap b/src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_popover.test.tsx.snap
index adbd5df22ba..406b8b75d33 100644
--- a/src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_popover.test.tsx.snap
+++ b/src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_popover.test.tsx.snap
@@ -4,30 +4,26 @@ exports[`EuiCollapsedNavPopover renders the title and sub-items within the popov
@@ -120,52 +112,48 @@ exports[`renders EuiColorPicker with a clearable input 1`] = `
exports[`renders EuiColorPicker with a color swatch when color is defined 1`] = `
@@ -174,53 +162,49 @@ exports[`renders EuiColorPicker with a color swatch when color is defined 1`] =
exports[`renders EuiColorPicker with a custom placeholder 1`] = `
@@ -229,53 +213,49 @@ exports[`renders EuiColorPicker with a custom placeholder 1`] = `
exports[`renders EuiColorPicker with an empty swatch when color is "" 1`] = `
@@ -284,53 +264,49 @@ exports[`renders EuiColorPicker with an empty swatch when color is "" 1`] = `
exports[`renders EuiColorPicker with an empty swatch when color is null 1`] = `
@@ -339,116 +315,108 @@ exports[`renders EuiColorPicker with an empty swatch when color is null 1`] = `
exports[`renders a EuiColorPicker with a prepend and append 1`] = `
@@ -90,71 +82,67 @@ exports[`EuiColorPalettePicker is rendered with a selected custom text 1`] = `
exports[`EuiColorPalettePicker is rendered with a selected fixed palette 1`] = `
+
-
-
-
-
- Palette 1
-
-
-
-
-
-
-
-
+ Palette 1
-
-
+
+
+
+
-
+
+
+
+
+
+
@@ -163,51 +151,47 @@ exports[`EuiColorPalettePicker is rendered with a selected fixed palette 1`] = `
exports[`EuiColorPalettePicker is rendered with a selected gradient palette 1`] = `
+
-
+
+
+ Linear Gradient
+
+
+
-
-
- Linear Gradient
-
-
-
-
-
-
-
+
@@ -216,51 +200,47 @@ exports[`EuiColorPalettePicker is rendered with a selected gradient palette 1`]
exports[`EuiColorPalettePicker is rendered with a selected gradient palette with stops 1`] = `
+
-
+
+
+ Linear Gradient with stops
+
+
+
-
-
- Linear Gradient with stops
-
-
-
-
-
-
-
+
@@ -269,43 +249,39 @@ exports[`EuiColorPalettePicker is rendered with a selected gradient palette with
exports[`EuiColorPalettePicker is rendered with the prop selectionDisplay set as title 1`] = `
@@ -314,70 +290,66 @@ exports[`EuiColorPalettePicker is rendered with the prop selectionDisplay set as
exports[`EuiColorPalettePicker more props are propagated to each option 1`] = `
+
+
`;
@@ -297,32 +293,28 @@ exports[`useDataGridColumnSelector columnSelector [React 16] renders a toolbar b
exports[`useDataGridColumnSelector columnSelector [React 17] renders a toolbar button/popover allowing users to set column visibility and order 1`] = `
-
-
+
-
-
- Columns
-
+ Columns
-
-
+
+
`;
@@ -592,32 +584,28 @@ exports[`useDataGridColumnSelector columnSelector [React 17] renders a toolbar b
exports[`useDataGridColumnSelector columnSelector [React 18] renders a toolbar button/popover allowing users to set column visibility and order 1`] = `
-
-
+
-
-
- Columns
-
+ Columns
-
-
+
+
`;
diff --git a/src/components/datagrid/controls/__snapshots__/column_sorting.test.tsx.snap b/src/components/datagrid/controls/__snapshots__/column_sorting.test.tsx.snap
index bca6d1dc934..1db65212337 100644
--- a/src/components/datagrid/controls/__snapshots__/column_sorting.test.tsx.snap
+++ b/src/components/datagrid/controls/__snapshots__/column_sorting.test.tsx.snap
@@ -2,32 +2,28 @@
exports[`useDataGridColumnSorting columnSorting [React 16] renders a toolbar button/popover allowing users to set column sorting 1`] = `
-
-
+
-
-
- 1 field sorted
-
+ 1 field sorted
-
-
+
+
`;
@@ -237,32 +233,28 @@ exports[`useDataGridColumnSorting columnSorting [React 16] renders a toolbar but
class="euiFlexItem emotion-euiFlexItem-growZero"
>
-
-
-
- Pick fields to sort by
-
-
+ Pick fields to sort by
-
-
+
+
+
-
-
+
-
-
- 1 field sorted
-
+ 1 field sorted
-
-
+
+
`;
@@ -527,32 +515,28 @@ exports[`useDataGridColumnSorting columnSorting [React 17] renders a toolbar but
class="euiFlexItem emotion-euiFlexItem-growZero"
>
-
-
-
- Pick fields to sort by
-
-
+ Pick fields to sort by
-
-
+
+
+
-
-
+
-
-
- 1 field sorted
-
+ 1 field sorted
-
-
+
+
`;
@@ -817,32 +797,28 @@ exports[`useDataGridColumnSorting columnSorting [React 18] renders a toolbar but
class="euiFlexItem emotion-euiFlexItem-growZero"
>
-
-
-
- Pick fields to sort by
-
-
+ Pick fields to sort by
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
@@ -260,30 +256,26 @@ exports[`useDataGridKeyboardShortcuts [React 17] returns a popover containing a
data-test-subj="hookRoot"
>
-
-
-
-
-
-
-
+
+
+
@@ -514,30 +506,26 @@ exports[`useDataGridKeyboardShortcuts [React 18] returns a popover containing a
data-test-subj="hookRoot"
>
-
-
-
-
-
-
-
+
+
+
diff --git a/src/components/datagrid/data_grid.test.tsx b/src/components/datagrid/data_grid.test.tsx
index c6c48e0fa77..9b60bccf9c4 100644
--- a/src/components/datagrid/data_grid.test.tsx
+++ b/src/components/datagrid/data_grid.test.tsx
@@ -111,12 +111,11 @@ function openColumnSorterSelection(datagrid: ReactWrapper) {
'EuiPopover[data-test-subj="dataGridColumnSortingPopoverColumnSelection"]'
);
expect(columnSelectionPopover).not.euiPopoverToBeOpen();
- const popoverButton = columnSelectionPopover
- .find('div[className~="euiPopover__anchor"]')
- .find('[onClick]')
- .first();
- // @ts-ignore onClick is known to exist, and does not require an argument in this usage
- act(() => popoverButton.props().onClick());
+ act(() => {
+ columnSelectionPopover
+ .find('button[data-test-subj="dataGridColumnSortingSelectionButton"]')
+ .simulate('click');
+ });
datagrid.update();
@@ -136,12 +135,11 @@ function closeColumnSorterSelection(datagrid: ReactWrapper) {
if (columnSelectionPopover.length > 0) {
expect(columnSelectionPopover).euiPopoverToBeOpen();
- const popoverButton = columnSelectionPopover
- .find('div[className~="euiPopover__anchor"]')
- .find('[onClick]')
- .first();
- // @ts-ignore onClick is known to exist, and does not require an argument in this usage
- act(() => popoverButton.props().onClick());
+ act(() => {
+ columnSelectionPopover
+ .find('button[data-test-subj="dataGridColumnSortingSelectionButton"]')
+ .simulate('click');
+ });
datagrid.update();
@@ -206,12 +204,11 @@ function openColumnSorter(datagrid: ReactWrapper) {
);
expect(popover).not.euiPopoverToBeOpen();
- const popoverButton = popover
- .find('div[className~="euiPopover__anchor"]')
- .find('[onClick]')
- .first();
- // @ts-ignore onClick is known to exist, and does not require an argument in this usage
- act(() => popoverButton.props().onClick());
+ act(() => {
+ popover
+ .find('button[data-test-subj="dataGridColumnSortingButton"]')
+ .simulate('click');
+ });
datagrid.update();
@@ -229,12 +226,11 @@ function closeColumnSorter(datagrid: ReactWrapper) {
);
expect(popover).euiPopoverToBeOpen();
- const popoverButton = popover
- .find('div[className~="euiPopover__anchor"]')
- .find('[onClick]')
- .first();
- // @ts-ignore onClick is known to exist, and does not require an argument in this usage
- act(() => popoverButton.props().onClick());
+ act(() => {
+ popover
+ .find('button[data-test-subj="dataGridColumnSortingButton"]')
+ .simulate('click');
+ });
datagrid.update();
@@ -334,12 +330,11 @@ function openColumnSelector(datagrid: ReactWrapper) {
);
expect(popover).not.euiPopoverToBeOpen();
- const popoverButton = popover
- .find('div[className~="euiPopover__anchor"]')
- .find('[onClick]')
- .first();
- // @ts-ignore onClick is known to exist, and does not require an argument in this usage
- act(() => popoverButton.props().onClick());
+ act(() => {
+ popover
+ .find('button[data-test-subj="dataGridColumnSelectorButton"]')
+ .simulate('click');
+ });
datagrid.update();
@@ -357,12 +352,11 @@ function closeColumnSelector(datagrid: ReactWrapper) {
);
expect(popover).euiPopoverToBeOpen();
- const popoverButton = popover
- .find('div[className~="euiPopover__anchor"]')
- .find('[onClick]')
- .first();
- // @ts-ignore onClick is known to exist, and does not require an argument in this usage
- act(() => popoverButton.props().onClick());
+ act(() => {
+ popover
+ .find('button[data-test-subj="dataGridColumnSelectorButton"]')
+ .simulate('click');
+ });
datagrid.update();
@@ -403,12 +397,11 @@ function moveColumnToIndex(
);
expect(popover).not.euiPopoverToBeOpen();
- let popoverButton = popover
- .find('div[className~="euiPopover__anchor"]')
- .find('[onClick]')
- .first();
- // @ts-ignore onClick is known to exist, and does not require an argument in this usage
- act(() => popoverButton.props().onClick());
+ act(() => {
+ popover
+ .find('button[data-test-subj="dataGridColumnSelectorButton"]')
+ .simulate('click');
+ });
datagrid.update();
@@ -438,12 +431,11 @@ function moveColumnToIndex(
);
expect(popover).euiPopoverToBeOpen();
- popoverButton = popover
- .find('div[className~="euiPopover__anchor"]')
- .find('[onClick]')
- .first();
- // @ts-ignore onClick is known to exist, and does not require an argument in this usage
- act(() => popoverButton.props().onClick());
+ act(() => {
+ popover
+ .find('button[data-test-subj="dataGridColumnSelectorButton"]')
+ .simulate('click');
+ });
datagrid.update();
diff --git a/src/components/date_picker/__snapshots__/date_picker.test.tsx.snap b/src/components/date_picker/__snapshots__/date_picker.test.tsx.snap
index e6b9a6ecbbe..e75a831f061 100644
--- a/src/components/date_picker/__snapshots__/date_picker.test.tsx.snap
+++ b/src/components/date_picker/__snapshots__/date_picker.test.tsx.snap
@@ -830,21 +830,17 @@ exports[`EuiDatePicker renders 1`] = `