diff --git a/awx/ui_next/src/components/AdHocCommands/AdHocCommands.jsx b/awx/ui_next/src/components/AdHocCommands/AdHocCommands.jsx index 89387b9e8b..b4523b4bdd 100644 --- a/awx/ui_next/src/components/AdHocCommands/AdHocCommands.jsx +++ b/awx/ui_next/src/components/AdHocCommands/AdHocCommands.jsx @@ -128,6 +128,7 @@ function AdHocCommands({ adHocItems, i18n, hasListItems }) { ) : ( -
- - - {children} - - - ); -} -CollapsibleSection.propTypes = { - label: string.isRequired, - startExpanded: bool, -}; -CollapsibleSection.defaultProps = { - startExpanded: false, -}; - -export default CollapsibleSection; diff --git a/awx/ui_next/src/components/CollapsibleSection/CollapsibleSection.test.jsx b/awx/ui_next/src/components/CollapsibleSection/CollapsibleSection.test.jsx deleted file mode 100644 index d3b5d09930..0000000000 --- a/awx/ui_next/src/components/CollapsibleSection/CollapsibleSection.test.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import { shallow } from 'enzyme'; -import CollapsibleSection from './CollapsibleSection'; - -describe('', () => { - it('should render contents', () => { - const wrapper = shallow( - foo - ); - expect(wrapper.find('Button > *').prop('isExpanded')).toEqual(false); - expect(wrapper.find('ExpandingContainer').prop('isExpanded')).toEqual( - false - ); - expect(wrapper.find('ExpandingContainer').prop('children')).toEqual('foo'); - }); - - it('should toggle when clicked', () => { - const wrapper = shallow( - foo - ); - expect(wrapper.find('Button > *').prop('isExpanded')).toEqual(false); - wrapper.find('Button').simulate('click'); - expect(wrapper.find('Button > *').prop('isExpanded')).toEqual(true); - expect(wrapper.find('ExpandingContainer').prop('isExpanded')).toEqual(true); - }); -}); diff --git a/awx/ui_next/src/components/CollapsibleSection/ExpandingContainer.jsx b/awx/ui_next/src/components/CollapsibleSection/ExpandingContainer.jsx deleted file mode 100644 index 346297c94a..0000000000 --- a/awx/ui_next/src/components/CollapsibleSection/ExpandingContainer.jsx +++ /dev/null @@ -1,44 +0,0 @@ -import 'styled-components/macro'; -import React, { useState, useEffect, useRef } from 'react'; -import { bool } from 'prop-types'; -import styled from 'styled-components'; - -const Container = styled.div` - margin: 15px 0; - transition: height 0.2s ease-out; - ${props => props.hideOverflow && `overflow: hidden;`} -`; - -function ExpandingContainer({ isExpanded, children }) { - const [contentHeight, setContentHeight] = useState(0); - const [hideOverflow, setHideOverflow] = useState(!isExpanded); - const ref = useRef(null); - useEffect(() => { - ref.current.addEventListener('transitionend', () => { - setHideOverflow(!isExpanded); - }); - }); - useEffect(() => { - setContentHeight(ref.current.scrollHeight); - }, [setContentHeight, children]); - const height = isExpanded ? contentHeight : '0'; - return ( - - {children} - - ); -} -ExpandingContainer.propTypes = { - isExpanded: bool, -}; -ExpandingContainer.defaultProps = { - isExpanded: false, -}; - -export default ExpandingContainer; diff --git a/awx/ui_next/src/components/CollapsibleSection/index.js b/awx/ui_next/src/components/CollapsibleSection/index.js deleted file mode 100644 index a4623e90ed..0000000000 --- a/awx/ui_next/src/components/CollapsibleSection/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './CollapsibleSection'; diff --git a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx index f17bd9ca95..68963bcf12 100644 --- a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx +++ b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx @@ -35,6 +35,7 @@ function DeleteButton({ onClose={() => setIsOpen(false)} actions={[ , - , ]} diff --git a/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.jsx b/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.jsx index 7e5777c627..d06c75b36d 100644 --- a/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.jsx +++ b/awx/ui_next/src/components/ResourceAccessList/DeleteRoleConfirmationModal.jsx @@ -29,6 +29,7 @@ function DeleteRoleConfirmationModal({ onClose={onCancel} actions={[ , - , ]} diff --git a/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap b/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap index 820035723e..a1dd54a0a3 100644 --- a/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap +++ b/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap @@ -23,12 +23,14 @@ exports[` should render initially 1`] = ` , , , , )} diff --git a/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.jsx b/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.jsx index 34662e5ed2..78bc9b74e4 100644 --- a/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialList/CredentialListItem.jsx @@ -63,6 +63,7 @@ function CredentialListItem({ diff --git a/awx/ui_next/src/screens/ExecutionEnvironment/ExecutionEnvironmentList/ExecutionEnvironmentListItem.jsx b/awx/ui_next/src/screens/ExecutionEnvironment/ExecutionEnvironmentList/ExecutionEnvironmentListItem.jsx index 07816ff5fc..ab38b3e00a 100644 --- a/awx/ui_next/src/screens/ExecutionEnvironment/ExecutionEnvironmentList/ExecutionEnvironmentListItem.jsx +++ b/awx/ui_next/src/screens/ExecutionEnvironment/ExecutionEnvironmentList/ExecutionEnvironmentListItem.jsx @@ -81,7 +81,7 @@ function ExecutionEnvironmentListItem({ tooltip={i18n._(t`Edit Execution Environment`)} > diff --git a/awx/ui_next/src/screens/Host/HostList/HostListItem.jsx b/awx/ui_next/src/screens/Host/HostList/HostListItem.jsx index 87c4d4eff6..efcd070427 100644 --- a/awx/ui_next/src/screens/Host/HostList/HostListItem.jsx +++ b/awx/ui_next/src/screens/Host/HostList/HostListItem.jsx @@ -52,6 +52,7 @@ function HostListItem({ tooltip={i18n._(t`Edit Host`)} > diff --git a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.jsx b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.jsx index 2fa80ede52..61b9242a0b 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHosts/InventoryHostItem.jsx @@ -66,7 +66,12 @@ function InventoryHostItem(props) { {host.summary_fields.user_capabilities?.edit && ( - diff --git a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx index 2b2f660efd..5d3275b6e8 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx @@ -115,6 +115,7 @@ function InventoryListItem({ tooltip={i18n._(t`Edit Inventory`)} > )} diff --git a/awx/ui_next/src/screens/ManagementJob/ManagementJobList/ManagementJobListItem.jsx b/awx/ui_next/src/screens/ManagementJob/ManagementJobList/ManagementJobListItem.jsx index 06ca1b8dc4..0347cfa47a 100644 --- a/awx/ui_next/src/screens/ManagementJob/ManagementJobList/ManagementJobListItem.jsx +++ b/awx/ui_next/src/screens/ManagementJob/ManagementJobList/ManagementJobListItem.jsx @@ -95,6 +95,7 @@ function ManagementJobListItem({ position="top" > diff --git a/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.jsx b/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.jsx index e65f176b83..02e4873f59 100644 --- a/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.jsx +++ b/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.jsx @@ -94,7 +94,7 @@ function UIDetail({ i18n }) { aria-label={i18n._(t`Edit`)} component={Link} to="/settings/ui/edit" - ouiaId="edit-button" + ouiaId="ui-detail-edit-button" > {i18n._(t`Edit`)} diff --git a/awx/ui_next/src/screens/Setting/shared/RevertAllAlert.jsx b/awx/ui_next/src/screens/Setting/shared/RevertAllAlert.jsx index 96983f02e0..3622e0afd2 100644 --- a/awx/ui_next/src/screens/Setting/shared/RevertAllAlert.jsx +++ b/awx/ui_next/src/screens/Setting/shared/RevertAllAlert.jsx @@ -14,20 +14,20 @@ function RevertAllAlert({ i18n, onClose, onRevertAll }) { ouiaId="revert-all-modal" actions={[ , , diff --git a/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.jsx b/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.jsx index 8347c1c735..b624d995e2 100644 --- a/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.jsx +++ b/awx/ui_next/src/screens/Team/TeamDetail/TeamDetail.jsx @@ -54,6 +54,7 @@ function TeamDetail({ team, i18n }) { {summary_fields.user_capabilities && summary_fields.user_capabilities.edit && ( )} diff --git a/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx b/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx index 45ff07dd79..939b08e0ce 100644 --- a/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx +++ b/awx/ui_next/src/screens/Template/Survey/SurveyList.jsx @@ -98,6 +98,7 @@ function SurveyList({ }} actions={[ )} diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.jsx index bae18f2011..99fc39810f 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/DeleteAllNodesModal.jsx @@ -11,6 +11,7 @@ function DeleteAllNodesModal({ i18n }) { ,