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/PaginatedTable/PaginatedTable.jsx b/awx/ui_next/src/components/PaginatedTable/PaginatedTable.jsx index bf70c2acc6..2d33fe1e66 100644 --- a/awx/ui_next/src/components/PaginatedTable/PaginatedTable.jsx +++ b/awx/ui_next/src/components/PaginatedTable/PaginatedTable.jsx @@ -38,6 +38,7 @@ function PaginatedTable({ i18n, renderToolbar, emptyContentMessage, + ouiaId, }) { const history = useHistory(); @@ -95,7 +96,7 @@ function PaginatedTable({ Content = (