From 9548ea30a5706332a423dd54edd00ba439973b63 Mon Sep 17 00:00:00 2001 From: Dmitrii Misharov Date: Tue, 22 Sep 2020 19:40:10 +0200 Subject: [PATCH] Added more OUIA props into Dropdown component (#4754) * Added more OUIA props into Dropdown component * Better OUIA default ids for DropdownToggleCheckbox * getOUIAProps is replaced by useOUIAProps --- .../ApplicationLauncher.test.tsx.snap | 222 ++++++++++++++++++ .../src/components/Dropdown/DropdownItem.tsx | 70 +++--- .../components/Dropdown/DropdownSeparator.tsx | 35 +-- .../components/Dropdown/DropdownToggle.tsx | 7 +- .../Dropdown/DropdownToggleCheckbox.tsx | 31 ++- .../DropdownToggleCheckbox.test.tsx.snap | 3 + .../__snapshots__/Dropdown.test.tsx.snap | 90 +++++++ .../DropdownToggle.test.tsx.snap | 30 +++ .../DropdownToggleCheckbox.test.tsx.snap | 21 ++ .../__snapshots__/Toggle.test.tsx.snap | 6 + .../__snapshots__/OptionsMenu.test.tsx.snap | 195 +++++++++++++++ .../__snapshots__/Pagination.test.tsx.snap | 195 +++++++++++++++ 12 files changed, 856 insertions(+), 49 deletions(-) diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap b/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap index 89358d553ee..5208df7424a 100644 --- a/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap +++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap @@ -147,6 +147,9 @@ exports[`ApplicationLauncher custom icon 1`] = ` aria-haspopup="true" aria-label="Application launcher" class="pf-c-app-launcher__toggle" + data-ouia-component-id="OUIA-Generated-DropdownToggle-6" + data-ouia-component-type="PF4/DropdownToggle" + data-ouia-safe="true" id="pf-dropdown-toggle-id-5" type="button" > @@ -178,6 +181,9 @@ exports[`ApplicationLauncher custom icon 1`] = ` Link @@ -188,6 +194,9 @@ exports[`ApplicationLauncher custom icon 1`] = ` >