diff --git a/awx/ui_next/src/components/DetailList/Detail.jsx b/awx/ui_next/src/components/DetailList/Detail.jsx
index 9f8f3647b3..10be98d335 100644
--- a/awx/ui_next/src/components/DetailList/Detail.jsx
+++ b/awx/ui_next/src/components/DetailList/Detail.jsx
@@ -25,17 +25,21 @@ const DetailValue = styled(({ fullWidth, ...props }) => (
`}
`;
-const Detail = ({ label, value, fullWidth, className }) => {
+const Detail = ({ label, value, fullWidth, className, dataCy }) => {
if (!value && typeof value !== 'number') {
return null;
}
+ const labelCy = dataCy ? `${dataCy}-label` : null;
+ const valueCy = dataCy ? `${dataCy}-value` : null;
+
return (
<>
{label}
@@ -43,6 +47,7 @@ const Detail = ({ label, value, fullWidth, className }) => {
className={className}
component={TextListItemVariants.dd}
fullWidth={fullWidth}
+ data-cy={valueCy}
>
{value}
diff --git a/awx/ui_next/src/components/PageHeaderToolbar/PageHeaderToolbar.jsx b/awx/ui_next/src/components/PageHeaderToolbar/PageHeaderToolbar.jsx
index a248d24a5e..d1b88f5c23 100644
--- a/awx/ui_next/src/components/PageHeaderToolbar/PageHeaderToolbar.jsx
+++ b/awx/ui_next/src/components/PageHeaderToolbar/PageHeaderToolbar.jsx
@@ -95,6 +95,7 @@ class PageHeaderToolbar extends Component {
{i18n._(t`User`)}}>
initially renders succesfully 1`] = `
>
initially renders succesfully 1`] = `
Name
@@ -440,10 +445,12 @@ exports[` initially renders succesfully 1`] = `
initially renders succesfully 1`] = `
jane brown
@@ -563,10 +573,12 @@ exports[` initially renders succesfully 1`] = `
>
initially renders succesfully 1`] = `
Team Roles
@@ -614,10 +629,12 @@ exports[` initially renders succesfully 1`] = `
initially renders succesfully 1`] = `
-
+