diff --git a/awx/ui_next/src/components/AlertModal/AlertModal.jsx b/awx/ui_next/src/components/AlertModal/AlertModal.jsx index fd0e3236e5..0c443300be 100644 --- a/awx/ui_next/src/components/AlertModal/AlertModal.jsx +++ b/awx/ui_next/src/components/AlertModal/AlertModal.jsx @@ -23,6 +23,7 @@ function AlertModal({ i18n, isOpen = null, title, + label, variant, children, i18nHash, @@ -73,7 +74,7 @@ function AlertModal({ return ( this.setState({ deletionError: null })} title={i18n._(t`Job Delete Error`)} + label={i18n._(t`Job Delete Error`)} > diff --git a/awx/ui_next/src/screens/Job/JobOutput/JobOutput.test.jsx b/awx/ui_next/src/screens/Job/JobOutput/JobOutput.test.jsx index f1fb386ad2..5531a0ade6 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/JobOutput.test.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/JobOutput.test.jsx @@ -325,7 +325,7 @@ describe('', () => { expect(JobsAPI.destroy).toHaveBeenCalledTimes(1); }); - test.skip('should show error dialog for failed deletion', async () => { + test('should show error dialog for failed deletion', async () => { JobsAPI.destroy.mockRejectedValue(new Error({})); wrapper = mountWithContexts(); await waitForElement(wrapper, 'JobEvent', el => el.length > 0); @@ -338,7 +338,7 @@ describe('', () => { wrapper.find('Modal button[aria-label="Delete"]').simulate('click'); await waitForElement(wrapper, 'Modal ErrorDetail'); const errorModalCloseBtn = wrapper.find( - 'ModalBox div[aria-label="Job Delete Error"] button[aria-label="Close"]' + 'ModalBox[aria-label="Job Delete Error"] ModalBoxCloseButton' ); errorModalCloseBtn.simulate('click'); await waitForElement(wrapper, 'Modal ErrorDetail', el => el.length === 0); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.test.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.test.jsx index 7da3636c9d..405e8a91e4 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.test.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.test.jsx @@ -4,7 +4,10 @@ import { WorkflowDispatchContext, WorkflowStateContext, } from '../../../../../contexts/Workflow'; -import { mountWithContexts } from '../../../../../../testUtils/enzymeHelpers'; +import { + waitForElement, + mountWithContexts, +} from '../../../../../../testUtils/enzymeHelpers'; import { InventorySourcesAPI, JobTemplatesAPI, @@ -22,7 +25,7 @@ let wrapper; const dispatch = jest.fn(); const onSave = jest.fn(); -describe.skip('NodeModal', () => { +describe('NodeModal', () => { beforeAll(() => { JobTemplatesAPI.read.mockResolvedValue({ data: { @@ -95,6 +98,7 @@ describe.skip('NodeModal', () => { ); }); + await waitForElement(wrapper, 'PFWizard'); }); afterAll(() => { @@ -307,6 +311,7 @@ describe.skip('NodeModal', () => { ); }); + await waitForElement(wrapper, 'PFWizard'); expect(wrapper.find('AnsibleSelect').prop('value')).toBe('project_sync'); await act(async () => { wrapper.find('AnsibleSelect').prop('onChange')(null, 'approval'); @@ -388,6 +393,7 @@ describe.skip('NodeModal', () => { ); }); + await waitForElement(wrapper, 'PFWizard'); expect(wrapper.find('AnsibleSelect').prop('value')).toBe('approval'); await act(async () => { wrapper.find('AnsibleSelect').prop('onChange')(