summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormabashian <mabashia@redhat.com>2021-03-18 19:08:55 +0100
committermabashian <mabashia@redhat.com>2021-03-18 19:08:55 +0100
commit74460fa2d7b79d041dd70686cfc63c23e10a0567 (patch)
tree3f4862b7d324de40f76cf44e7b19ac2972861003
parentFix output search styling (diff)
downloadawx-74460fa2d7b79d041dd70686cfc63c23e10a0567.tar.xz
awx-74460fa2d7b79d041dd70686cfc63c23e10a0567.zip
Adds ouiaId's to output page buttons
-rw-r--r--awx/ui_next/src/components/LaunchButton/ReLaunchDropDown.jsx3
-rw-r--r--awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.jsx14
2 files changed, 14 insertions, 3 deletions
diff --git a/awx/ui_next/src/components/LaunchButton/ReLaunchDropDown.jsx b/awx/ui_next/src/components/LaunchButton/ReLaunchDropDown.jsx
index 709d31e06c..6d0539c705 100644
--- a/awx/ui_next/src/components/LaunchButton/ReLaunchDropDown.jsx
+++ b/awx/ui_next/src/components/LaunchButton/ReLaunchDropDown.jsx
@@ -11,7 +11,7 @@ import {
} from '@patternfly/react-core';
import { RocketIcon } from '@patternfly/react-icons';
-function ReLaunchDropDown({ isPrimary = false, handleRelaunch, i18n }) {
+function ReLaunchDropDown({ isPrimary = false, handleRelaunch, i18n, ouiaId }) {
const [isOpen, setIsOPen] = useState(false);
const onToggle = () => {
@@ -75,6 +75,7 @@ function ReLaunchDropDown({ isPrimary = false, handleRelaunch, i18n }) {
return (
<Dropdown
+ ouiaId={ouiaId}
isPlain
position={DropdownPosition.right}
isOpen={isOpen}
diff --git a/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.jsx b/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.jsx
index 1e2c19129d..03faba1faa 100644
--- a/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.jsx
+++ b/awx/ui_next/src/screens/Job/JobOutput/shared/OutputToolbar.jsx
@@ -145,13 +145,17 @@ const OutputToolbar = ({
{job.status === 'failed' && job.type === 'job' ? (
<LaunchButton resource={job}>
{({ handleRelaunch }) => (
- <ReLaunchDropDown handleRelaunch={handleRelaunch} />
+ <ReLaunchDropDown
+ handleRelaunch={handleRelaunch}
+ ouiaId="job-output-relaunch-dropdown"
+ />
)}
</LaunchButton>
) : (
<LaunchButton resource={job}>
{({ handleRelaunch }) => (
<Button
+ ouiaId="job-output-relaunch-button"
variant="plain"
onClick={handleRelaunch}
aria-label={i18n._(t`Relaunch`)}
@@ -167,7 +171,11 @@ const OutputToolbar = ({
{job.related?.stdout && (
<Tooltip content={i18n._(t`Download Output`)}>
<a href={`${job.related.stdout}?format=txt_download`}>
- <Button variant="plain" aria-label={i18n._(t`Download Output`)}>
+ <Button
+ ouiaId="job-output-download-button"
+ variant="plain"
+ aria-label={i18n._(t`Download Output`)}
+ >
<DownloadIcon />
</Button>
</a>
@@ -177,6 +185,7 @@ const OutputToolbar = ({
['pending', 'waiting', 'running'].includes(jobStatus) && (
<Tooltip content={i18n._(t`Cancel Job`)}>
<Button
+ ouiaId="job-output-cancel-button"
variant="plain"
aria-label={i18n._(t`Cancel Job`)}
onClick={onCancel}
@@ -191,6 +200,7 @@ const OutputToolbar = ({
) && (
<Tooltip content={i18n._(t`Delete Job`)}>
<DeleteButton
+ ouiaId="job-output-delete-button"
name={job.name}
modalTitle={i18n._(t`Delete Job`)}
onConfirm={onDelete}