diff --git a/awx/ui_next/src/components/ErrorDetail/ErrorDetail.test.jsx b/awx/ui_next/src/components/ErrorDetail/ErrorDetail.test.jsx
index 409fefc3f8..383c41e4ed 100644
--- a/awx/ui_next/src/components/ErrorDetail/ErrorDetail.test.jsx
+++ b/awx/ui_next/src/components/ErrorDetail/ErrorDetail.test.jsx
@@ -41,6 +41,5 @@ describe('ErrorDetail', () => {
);
wrapper.find('Expandable').prop('onToggle')();
wrapper.update();
- // console.log(wrapper.find('ErrorDetail').prop('error'));
});
});
diff --git a/awx/ui_next/src/components/ErrorDetail/getErrorMessage.js b/awx/ui_next/src/components/ErrorDetail/getErrorMessage.js
index 82783f8f63..ca6fbb23be 100644
--- a/awx/ui_next/src/components/ErrorDetail/getErrorMessage.js
+++ b/awx/ui_next/src/components/ErrorDetail/getErrorMessage.js
@@ -1,10 +1,10 @@
export default function getErrorMessage(response) {
- if (typeof response.data === 'string') {
- return response.data;
- }
if (!response.data) {
return null;
}
+ if (typeof response.data === 'string') {
+ return response.data;
+ }
if (response.data.detail) {
return response.data.detail;
}
diff --git a/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.test.jsx b/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.test.jsx
index 3a490db6bc..78e8dc5504 100644
--- a/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.test.jsx
+++ b/awx/ui_next/src/components/LaunchPrompt/LaunchPrompt.test.jsx
@@ -6,9 +6,11 @@ import InventoryStep from './InventoryStep';
import CredentialsStep from './CredentialsStep';
import OtherPromptsStep from './OtherPromptsStep';
import PreviewStep from './PreviewStep';
-import { InventoriesAPI } from '@api';
+import { InventoriesAPI, CredentialsAPI, CredentialTypesAPI } from '@api';
jest.mock('@api/models/Inventories');
+jest.mock('@api/models/CredentialTypes');
+jest.mock('@api/models/Credentials');
let config;
const resource = {
@@ -25,6 +27,10 @@ describe('LaunchPrompt', () => {
count: 1,
},
});
+ CredentialsAPI.read.mockResolvedValue({
+ data: { results: [{ id: 1 }], count: 1 },
+ });
+ CredentialTypesAPI.loadAllTypes({ data: { results: [{ type: 'ssh' }] } });
config = {
can_start_without_user_input: false,
diff --git a/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap b/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap
index 795f398ba2..e66d8780df 100644
--- a/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap
+++ b/awx/ui_next/src/components/ResourceAccessList/__snapshots__/DeleteRoleConfirmationModal.test.jsx.snap
@@ -322,7 +322,6 @@ exports[`