diff --git a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx index 245e6ec54c..f17bd9ca95 100644 --- a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx +++ b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx @@ -1,4 +1,5 @@ import React, { useState } from 'react'; +import PropTypes from 'prop-types'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { Button } from '@patternfly/react-core'; @@ -12,6 +13,7 @@ function DeleteButton({ variant, children, isDisabled, + ouiaId, }) { const [isOpen, setIsOpen] = useState(false); @@ -22,6 +24,7 @@ function DeleteButton({ aria-label={i18n._(t`Delete`)} isDisabled={isDisabled} onClick={() => setIsOpen(true)} + ouiaId={ouiaId} > {children || i18n._(t`Delete`)} @@ -58,4 +61,12 @@ function DeleteButton({ ); } +DeleteButton.propTypes = { + ouiaId: PropTypes.string, +}; + +DeleteButton.defaultProps = { + ouiaId: null, +}; + export default withI18n()(DeleteButton); diff --git a/awx/ui_next/src/components/FormActionGroup/FormActionGroup.jsx b/awx/ui_next/src/components/FormActionGroup/FormActionGroup.jsx index 43dc0be9e0..47b64f3ab5 100644 --- a/awx/ui_next/src/components/FormActionGroup/FormActionGroup.jsx +++ b/awx/ui_next/src/components/FormActionGroup/FormActionGroup.jsx @@ -10,6 +10,7 @@ const FormActionGroup = ({ onCancel, onSubmit, submitDisabled, i18n }) => {