diff --git a/awx/ui_next/src/components/CodeEditor/VariablesDetail.jsx b/awx/ui_next/src/components/CodeEditor/VariablesDetail.jsx
index fa46a60f40..797c10673d 100644
--- a/awx/ui_next/src/components/CodeEditor/VariablesDetail.jsx
+++ b/awx/ui_next/src/components/CodeEditor/VariablesDetail.jsx
@@ -115,6 +115,7 @@ function VariablesDetail({ dataCy, helpText, value, label, rows, i18n }) {
key="select"
variant="primary"
onClick={() => setIsExpanded(false)}
+ ouiaId={`${dataCy}-unexpand`}
>
{i18n._(t`Done`)}
,
@@ -212,6 +213,7 @@ function ModeToggle({
variant="plain"
aria-label={i18n._(t`Expand input`)}
onClick={onExpand}
+ ouiaId={`${dataCy}-expand`}
>
diff --git a/awx/ui_next/src/components/CodeEditor/VariablesField.jsx b/awx/ui_next/src/components/CodeEditor/VariablesField.jsx
index 35756132e8..6f039c6895 100644
--- a/awx/ui_next/src/components/CodeEditor/VariablesField.jsx
+++ b/awx/ui_next/src/components/CodeEditor/VariablesField.jsx
@@ -64,6 +64,7 @@ function VariablesField({
key="select"
variant="primary"
onClick={() => setIsExpanded(false)}
+ ouiaId={`${id}-variables-unexpand`}
>
{i18n._(t`Done`)}
,
@@ -163,6 +164,7 @@ function VariablesFieldInternals({
variant="plain"
aria-label={i18n._(t`Expand input`)}
onClick={onExpand}
+ ouiaId={`${id}-variables-expand`}
>
diff --git a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx
index d61819adcc..1a5cf4a4b1 100644
--- a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx
+++ b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx
@@ -372,6 +372,7 @@ function JobTemplateDetail({ i18n, template }) {
value={extra_vars}
rows={4}
label={i18n._(t`Variables`)}
+ dataCy={`jt-details-${template.id}`}
/>