diff --git a/awx/ui_next/src/components/Lookup/ProjectLookup.test.jsx b/awx/ui_next/src/components/Lookup/ProjectLookup.test.jsx
index 88060c2699..3ac468d867 100644
--- a/awx/ui_next/src/components/Lookup/ProjectLookup.test.jsx
+++ b/awx/ui_next/src/components/Lookup/ProjectLookup.test.jsx
@@ -94,4 +94,56 @@ describe('', () => {
expect(wrapper.find('ProjectLookup')).toHaveLength(1);
expect(wrapper.find('Lookup').prop('isDisabled')).toBe(true);
});
+
+ test('should not show helper text', async () => {
+ let wrapper;
+
+ ProjectsAPI.readOptions.mockReturnValue({
+ data: {
+ actions: {
+ GET: {},
+ },
+ related_search_fields: [],
+ },
+ });
+ await act(async () => {
+ wrapper = mountWithContexts(
+ {}}
+ />
+ );
+ });
+ wrapper.update();
+
+ expect(wrapper.find('div#project-helper').length).toBe(0);
+ });
+
+ test('should not show helper text', async () => {
+ let wrapper;
+
+ ProjectsAPI.readOptions.mockReturnValue({
+ data: {
+ actions: {
+ GET: {},
+ },
+ related_search_fields: [],
+ },
+ });
+ await act(async () => {
+ wrapper = mountWithContexts(
+ {}}
+ />
+ );
+ });
+ wrapper.update();
+
+ expect(wrapper.find('div#project-helper').text('helperTextInvalid')).toBe(
+ 'select value'
+ );
+ });
});
diff --git a/awx/ui_next/src/screens/Host/Host.jsx b/awx/ui_next/src/screens/Host/Host.jsx
index 18a7f80edd..2c29893b7c 100644
--- a/awx/ui_next/src/screens/Host/Host.jsx
+++ b/awx/ui_next/src/screens/Host/Host.jsx
@@ -64,8 +64,8 @@ function Host({ i18n, setBreadcrumb }) {
id: 2,
},
{
- name: i18n._(t`Completed Jobs`),
- link: `${match.url}/completed_jobs`,
+ name: i18n._(t`Jobs`),
+ link: `${match.url}/jobs`,
id: 3,
},
];
@@ -122,7 +122,7 @@ function Host({ i18n, setBreadcrumb }) {
,
-
+
,
]}
diff --git a/awx/ui_next/src/screens/Host/Hosts.jsx b/awx/ui_next/src/screens/Host/Hosts.jsx
index 4c128bc202..d8769b071e 100644
--- a/awx/ui_next/src/screens/Host/Hosts.jsx
+++ b/awx/ui_next/src/screens/Host/Hosts.jsx
@@ -29,7 +29,7 @@ function Hosts({ i18n }) {
[`/hosts/${host.id}/details`]: i18n._(t`Details`),
[`/hosts/${host.id}/facts`]: i18n._(t`Facts`),
[`/hosts/${host.id}/groups`]: i18n._(t`Groups`),
- [`/hosts/${host.id}/completed_jobs`]: i18n._(t`Completed Jobs`),
+ [`/hosts/${host.id}/jobs`]: i18n._(t`Jobs`),
});
},
[i18n]
diff --git a/awx/ui_next/src/screens/Inventory/Inventories.jsx b/awx/ui_next/src/screens/Inventory/Inventories.jsx
index 2da4264b0e..12178f667f 100644
--- a/awx/ui_next/src/screens/Inventory/Inventories.jsx
+++ b/awx/ui_next/src/screens/Inventory/Inventories.jsx
@@ -56,7 +56,7 @@ function Inventories({ i18n }) {
...initScreenHeader.current,
[inventoryPath]: `${inventory.name}`,
[`${inventoryPath}/access`]: i18n._(t`Access`),
- [`${inventoryPath}/completed_jobs`]: i18n._(t`Completed jobs`),
+ [`${inventoryPath}/jobs`]: i18n._(t`Jobs`),
[`${inventoryPath}/details`]: i18n._(t`Details`),
[`${inventoryPath}/edit`]: i18n._(t`Edit details`),
@@ -69,9 +69,7 @@ function Inventories({ i18n }) {
[`${inventoryHostsPath}/${nestedObject?.id}/details`]: i18n._(
t`Host details`
),
- [`${inventoryHostsPath}/${nestedObject?.id}/completed_jobs`]: i18n._(
- t`Completed jobs`
- ),
+ [`${inventoryHostsPath}/${nestedObject?.id}/jobs`]: i18n._(t`Jobs`),
[`${inventoryHostsPath}/${nestedObject?.id}/facts`]: i18n._(t`Facts`),
[`${inventoryHostsPath}/${nestedObject?.id}/groups`]: i18n._(t`Groups`),
diff --git a/awx/ui_next/src/screens/Inventory/Inventory.jsx b/awx/ui_next/src/screens/Inventory/Inventory.jsx
index b62ba6a11a..15059270bc 100644
--- a/awx/ui_next/src/screens/Inventory/Inventory.jsx
+++ b/awx/ui_next/src/screens/Inventory/Inventory.jsx
@@ -65,8 +65,8 @@ function Inventory({ i18n, setBreadcrumb }) {
{ name: i18n._(t`Hosts`), link: `${match.url}/hosts`, id: 3 },
{ name: i18n._(t`Sources`), link: `${match.url}/sources`, id: 4 },
{
- name: i18n._(t`Completed Jobs`),
- link: `${match.url}/completed_jobs`,
+ name: i18n._(t`Jobs`),
+ link: `${match.url}/jobs`,
id: 5,
},
];
@@ -160,10 +160,7 @@ function Inventory({ i18n, setBreadcrumb }) {
setBreadcrumb={setBreadcrumb}
/>
,
-
+
diff --git a/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.test.jsx
index a351efb25c..75e462f17e 100644
--- a/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.test.jsx
+++ b/awx/ui_next/src/screens/Inventory/InventoryHost/InventoryHost.test.jsx
@@ -49,7 +49,7 @@ describe('', () => {
'Details',
'Facts',
'Groups',
- 'Completed Jobs',
+ 'Jobs',
];
wrapper.find('RoutedTabs li').forEach((tab, index) => {
expect(tab.text()).toEqual(expectedTabs[index]);
diff --git a/awx/ui_next/src/screens/Inventory/SmartInventory.jsx b/awx/ui_next/src/screens/Inventory/SmartInventory.jsx
index 91f0f537e6..0be4cf6740 100644
--- a/awx/ui_next/src/screens/Inventory/SmartInventory.jsx
+++ b/awx/ui_next/src/screens/Inventory/SmartInventory.jsx
@@ -70,8 +70,8 @@ function SmartInventory({ i18n, setBreadcrumb }) {
{ name: i18n._(t`Access`), link: `${match.url}/access`, id: 1 },
{ name: i18n._(t`Hosts`), link: `${match.url}/hosts`, id: 2 },
{
- name: i18n._(t`Completed jobs`),
- link: `${match.url}/completed_jobs`,
+ name: i18n._(t`Jobs`),
+ link: `${match.url}/jobs`,
id: 3,
},
];
@@ -150,10 +150,7 @@ function SmartInventory({ i18n, setBreadcrumb }) {
setBreadcrumb={setBreadcrumb}
/>
,
-
+
', () => {
let wrapper;
+ function assertDetail(label, value) {
+ expect(wrapper.find(`Detail[label="${label}"] dt`).text()).toBe(label);
+ expect(wrapper.find(`Detail[label="${label}"] dd`).text()).toBe(value);
+ }
afterEach(() => {
wrapper.unmount();
});
test('should display details', () => {
- function assertDetail(label, value) {
- expect(wrapper.find(`Detail[label="${label}"] dt`).text()).toBe(label);
- expect(wrapper.find(`Detail[label="${label}"] dd`).text()).toBe(value);
- }
-
wrapper = mountWithContexts(
', () => {
assertMissingDetail('Project');
assertMissingDetail('Inventory');
});
+ test('should display Playbook Check detail', () => {
+ wrapper = mountWithContexts(
+
+ );
+ assertDetail('Job Type', 'Playbook Check');
+ });
});
diff --git a/awx/ui_next/src/screens/Template/Template.jsx b/awx/ui_next/src/screens/Template/Template.jsx
index 0848b4287a..dddd151170 100644
--- a/awx/ui_next/src/screens/Template/Template.jsx
+++ b/awx/ui_next/src/screens/Template/Template.jsx
@@ -161,8 +161,8 @@ function Template({ i18n, setBreadcrumb }) {
tabsArray.push(
{
- name: i18n._(t`Completed Jobs`),
- link: `${match.url}/completed_jobs`,
+ name: i18n._(t`Jobs`),
+ link: `${match.url}/jobs`,
},
{
name: canAddAndEditSurvey ? i18n._(t`Survey`) : i18n._(t`View Survey`),
@@ -246,7 +246,7 @@ function Template({ i18n, setBreadcrumb }) {
/>
)}
-
+
diff --git a/awx/ui_next/src/screens/Template/Templates.jsx b/awx/ui_next/src/screens/Template/Templates.jsx
index c5c5e1335f..4deeeb32b3 100644
--- a/awx/ui_next/src/screens/Template/Templates.jsx
+++ b/awx/ui_next/src/screens/Template/Templates.jsx
@@ -45,7 +45,7 @@ function Templates({ i18n }) {
[`${templatePath}/edit`]: i18n._(t`Edit Details`),
[`${templatePath}/access`]: i18n._(t`Access`),
[`${templatePath}/notifications`]: i18n._(t`Notifications`),
- [`${templatePath}/completed_jobs`]: i18n._(t`Completed Jobs`),
+ [`${templatePath}/jobs`]: i18n._(t`Jobs`),
[surveyPath]: i18n._(t`Survey`),
[`${surveyPath}/add`]: i18n._(t`Add Question`),
[`${surveyPath}/edit`]: i18n._(t`Edit Question`),
diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplate.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplate.jsx
index 6bfa39c6c8..237ea084bb 100644
--- a/awx/ui_next/src/screens/Template/WorkflowJobTemplate.jsx
+++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplate.jsx
@@ -142,8 +142,8 @@ function WorkflowJobTemplate({ i18n, setBreadcrumb }) {
link: `${match.url}/visualizer`,
},
{
- name: i18n._(t`Completed Jobs`),
- link: `${match.url}/completed_jobs`,
+ name: i18n._(t`Jobs`),
+ link: `${match.url}/jobs`,
},
{
name: canAddAndEditSurvey ? i18n._(t`Survey`) : i18n._(t`View Survey`),
@@ -253,7 +253,7 @@ function WorkflowJobTemplate({ i18n, setBreadcrumb }) {
)}
{template?.id && (
-
+
{
- setFieldValue('playbook', 0);
+ setFieldValue('playbook', '');
setFieldValue('scm_branch', '');
setFieldValue('project', value);
},
@@ -271,7 +271,9 @@ function JobTemplateForm({
onBlur={() => projectHelpers.setTouched()}
tooltip={i18n._(t`Select the project containing the playbook
you want this job to execute.`)}
- isValid={!projectMeta.touched || !projectMeta.error}
+ isValid={
+ !projectMeta.touched || !projectMeta.error || projectField.value
+ }
helperTextInvalid={projectMeta.error}
onChange={handleProjectUpdate}
required
diff --git a/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx b/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx
index d0d853c013..79e80170a9 100644
--- a/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx
+++ b/awx/ui_next/src/screens/Template/shared/PlaybookSelect.jsx
@@ -58,6 +58,7 @@ function PlaybookSelect({
placeholderText={i18n._(t`Select a playbook`)}
isCreateable={false}
onSelect={(event, value) => {
+ setIsOpen(false);
onChange(value);
}}
id="template-playbook"