diff --git a/awx/ui_next/src/components/JobList/JobListCancelButton.jsx b/awx/ui_next/src/components/JobList/JobListCancelButton.jsx
index 9b6d15c661..cfa18a43ef 100644
--- a/awx/ui_next/src/components/JobList/JobListCancelButton.jsx
+++ b/awx/ui_next/src/components/JobList/JobListCancelButton.jsx
@@ -58,13 +58,13 @@ function JobListCancelButton({ i18n, jobsToCancel, onCancel }) {
one="You do not have permission to cancel the following job:"
other="You do not have permission to cancel the following jobs:"
/>
- {cannotCancelPermissions.map((job, i) =>
- i === cannotCancelPermissions.length - 1 ? (
- {job}
- ) : (
- {job},
- )
- )}
+ {cannotCancelPermissions.map((job, i) => (
+
+ {' '}
+ {job}
+ {i !== cannotCancelPermissions.length - 1 ? ',' : ''}
+
+ ))}
)}
{cannotCancelNotRunning.length > 0 && (
@@ -74,13 +74,13 @@ function JobListCancelButton({ i18n, jobsToCancel, onCancel }) {
one="You cannot cancel the following job because it is not running:"
other="You cannot cancel the following jobs because they are not running:"
/>
- {cannotCancelNotRunning.map((job, i) =>
- i === cannotCancelNotRunning.length - 1 ? (
- {job}
- ) : (
- {job},
- )
- )}
+ {cannotCancelNotRunning.map((job, i) => (
+
+ {' '}
+ {job}
+ {i !== cannotCancelNotRunning.length - 1 ? ',' : ''}
+
+ ))}
)}
diff --git a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx
index c241e5b201..1e6bd30f1e 100644
--- a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx
+++ b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx
@@ -82,9 +82,9 @@ function ScheduleListItem({
{Boolean(isMissingInventory || isMissingSurvey) && (
(
- {message}
- ))}
+ content={[isMissingInventory, isMissingSurvey].map(message =>
+ message ? {message}
: null
+ )}
position="right"
>
diff --git a/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.jsx b/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.jsx
index 84d9c7c882..a76f5440c9 100644
--- a/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.jsx
+++ b/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.jsx
@@ -1,6 +1,5 @@
import React, { useCallback, useEffect, useState } from 'react';
import { useHistory, useParams } from 'react-router-dom';
-import PropTypes from 'prop-types';
import { CardBody } from '../../../components/Card';
import {
CredentialsAPI,
@@ -14,6 +13,7 @@ import ContentLoading from '../../../components/ContentLoading';
import CredentialForm from '../shared/CredentialForm';
import useRequest from '../../../util/useRequest';
import { useConfig } from '../../../contexts/Config';
+import { Credential } from '../../../types';
function CredentialEdit({ credential }) {
const history = useHistory();
@@ -198,7 +198,7 @@ function CredentialEdit({ credential }) {
}
CredentialEdit.propTypes = {
- credential: PropTypes.objectOf(PropTypes.object).isRequired,
+ credential: Credential.isRequired,
};
export { CredentialEdit as _CredentialEdit };
diff --git a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.jsx b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.jsx
index ea06a49c03..c2d3a66690 100644
--- a/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.jsx
+++ b/awx/ui_next/src/screens/NotificationTemplate/NotificationTemplateList/NotificationTemplateList.jsx
@@ -120,6 +120,7 @@ function NotificationTemplatesList({ i18n }) {
};
const canAdd = actions && actions.POST;
+ const alertGroupDataCy = 'notification-template-alerts';
return (
<>
@@ -227,7 +228,7 @@ function NotificationTemplatesList({ i18n }) {
{i18n._(t`Failed to delete one or more notification template.`)}
-
+
{testToasts
.filter(notification => notification.status !== 'pending')
.map(notification => (
diff --git a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx
index 6f32a80d99..a9c87e8fd1 100644
--- a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx
+++ b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.test.jsx
@@ -13,9 +13,18 @@ import {
InventoriesAPI,
ProjectsAPI,
CredentialTypesAPI,
+ ExecutionEnvironmentsAPI,
+ CredentialsAPI,
} from '../../../api';
-jest.mock('../../../api');
+jest.mock('../../../api/models/ExecutionEnvironments');
+jest.mock('../../../api/models/WorkflowJobTemplates');
+jest.mock('../../../api/models/Labels');
+jest.mock('../../../api/models/Organizations');
+jest.mock('../../../api/models/Inventories');
+jest.mock('../../../api/models/Projects');
+jest.mock('../../../api/models/CredentialTypes');
+jest.mock('../../../api/models/Credentials');
describe('', () => {
let wrapper;
@@ -61,7 +70,12 @@ describe('', () => {
},
});
OrganizationsAPI.read.mockResolvedValue({
- results: [{ id: 1 }, { id: 2 }],
+ data: {
+ results: [
+ { id: 1, name: 'Organization 1' },
+ { id: 2, name: 'Organization 2' },
+ ],
+ },
});
InventoriesAPI.read.mockResolvedValue({
results: [
@@ -78,6 +92,18 @@ describe('', () => {
ProjectsAPI.readOptions.mockResolvedValue({
data: { actions: { GET: {}, POST: {} } },
});
+ ExecutionEnvironmentsAPI.read.mockResolvedValue({
+ data: { results: [] },
+ });
+ ExecutionEnvironmentsAPI.readOptions.mockResolvedValue({
+ data: { actions: { GET: {}, POST: {} } },
+ });
+ CredentialsAPI.read.mockResolvedValue({
+ data: { results: [] },
+ });
+ CredentialsAPI.readOptions.mockResolvedValue({
+ data: { actions: { GET: {}, POST: {} } },
+ });
history = createMemoryHistory({
initialEntries: ['/templates/workflow_job_template/6/edit'],