From d428a540a0c32975dda2e68fd3694c52cc6ce5f9 Mon Sep 17 00:00:00 2001 From: Tiago Date: Thu, 29 Apr 2021 18:16:46 -0300 Subject: [PATCH] ouiaId to AddDropDownButton ToolbarAddButton TemplateList InventoryList add testability to DataListToolbar.jsx add testability to AssociateModal.jsx HostGroupsList.jsx fix lint add ouiaId to InventoryGroupHostList.jsx add ouiaId to ExecutionEnvironmentList.jsx add ouiaId to InstanceGroupList.jsx add ouiaId to InstanceGroupDetails.jsx add ouiaId to ScheduleList.jsx and ContainerGroupDetails.jsx --- .../components/AddDropDownButton/AddDropDownButton.jsx | 3 ++- .../src/components/AssociateModal/AssociateModal.jsx | 2 ++ .../src/components/DataListToolbar/DataListToolbar.jsx | 1 + .../src/components/PaginatedDataList/ToolbarAddButton.jsx | 4 ++++ .../components/ResourceAccessList/ResourceAccessList.jsx | 1 + .../src/components/Schedule/ScheduleList/ScheduleList.jsx | 2 ++ awx/ui_next/src/components/TemplateList/TemplateList.jsx | 8 +++++++- .../ExecutionEnvironmentList/ExecutionEnvironmentList.jsx | 1 + .../src/screens/Host/HostGroups/HostGroupsList.jsx | 2 ++ .../ContainerGroupDetails/ContainerGroupDetails.jsx | 1 + .../InstanceGroupDetails/InstanceGroupDetails.jsx | 1 + .../InstanceGroup/InstanceGroupList/InstanceGroupList.jsx | 3 +++ .../InventoryGroupHosts/InventoryGroupHostList.jsx | 1 + .../src/screens/Inventory/InventoryList/InventoryList.jsx | 3 +++ 14 files changed, 31 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.jsx b/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.jsx index 8c2351110e..58d16923ea 100644 --- a/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.jsx +++ b/awx/ui_next/src/components/AddDropDownButton/AddDropDownButton.jsx @@ -5,7 +5,7 @@ import { Dropdown, DropdownPosition } from '@patternfly/react-core'; import { ToolbarAddButton } from '../PaginatedDataList'; import { useKebabifiedMenu } from '../../contexts/Kebabified'; -function AddDropDownButton({ dropdownItems }) { +function AddDropDownButton({ dropdownItems, ouiaId }) { const { isKebabified } = useKebabifiedMenu(); const [isOpen, setIsOpen] = useState(false); const element = useRef(null); @@ -35,6 +35,7 @@ function AddDropDownButton({ dropdownItems }) { position={DropdownPosition.right} toggle={ setIsOpen(!isOpen)} diff --git a/awx/ui_next/src/components/AssociateModal/AssociateModal.jsx b/awx/ui_next/src/components/AssociateModal/AssociateModal.jsx index a2f9663861..6c388091fc 100644 --- a/awx/ui_next/src/components/AssociateModal/AssociateModal.jsx +++ b/awx/ui_next/src/components/AssociateModal/AssociateModal.jsx @@ -25,6 +25,7 @@ function AssociateModal({ optionsRequest, isModalOpen = false, displayKey = 'name', + ouiaId, }) { const history = useHistory(); const { selected, handleSelect } = useSelected([]); @@ -93,6 +94,7 @@ function AssociateModal({ return ( { if (!isKebabModalOpen) { setIsKebabOpen(isOpen); diff --git a/awx/ui_next/src/components/PaginatedDataList/ToolbarAddButton.jsx b/awx/ui_next/src/components/PaginatedDataList/ToolbarAddButton.jsx index 846942b168..9fbd29902a 100644 --- a/awx/ui_next/src/components/PaginatedDataList/ToolbarAddButton.jsx +++ b/awx/ui_next/src/components/PaginatedDataList/ToolbarAddButton.jsx @@ -14,6 +14,7 @@ function ToolbarAddButton({ isDisabled, defaultLabel = t`Add`, showToggleIndicator, + ouiaId, }) { const { isKebabified } = useKebabifiedMenu(); @@ -26,6 +27,7 @@ function ToolbarAddButton({ if (isKebabified) { return (