diff --git a/awx/ui_next/src/components/JobList/JobList.jsx b/awx/ui_next/src/components/JobList/JobList.jsx index f03fa5ac89..972d058643 100644 --- a/awx/ui_next/src/components/JobList/JobList.jsx +++ b/awx/ui_next/src/components/JobList/JobList.jsx @@ -147,7 +147,7 @@ function JobList({ i18n, defaultParams, showTypeColumn = false }) { name: i18n._(t`Job Type`), key: `type`, options: [ - [`project_update`, i18n._(t`SCM Update`)], + [`project_update`, i18n._(t`Source Control Update`)], [`inventory_update`, i18n._(t`Inventory Sync`)], [`job`, i18n._(t`Playbook Run`)], [`ad_hoc_command`, i18n._(t`Command`)], diff --git a/awx/ui_next/src/components/JobList/JobListItem.jsx b/awx/ui_next/src/components/JobList/JobListItem.jsx index 9f9b762331..19e8089414 100644 --- a/awx/ui_next/src/components/JobList/JobListItem.jsx +++ b/awx/ui_next/src/components/JobList/JobListItem.jsx @@ -36,7 +36,7 @@ function JobListItem({ const labelId = `check-action-${job.id}`; const jobTypes = { - project_update: i18n._(t`SCM Update`), + project_update: i18n._(t`Source Control Update`), inventory_update: i18n._(t`Inventory Sync`), job: i18n._(t`Playbook Run`), command: i18n._(t`Command`), diff --git a/awx/ui_next/src/components/Lookup/ProjectLookup.jsx b/awx/ui_next/src/components/Lookup/ProjectLookup.jsx index 4bd30a3db3..7194926610 100644 --- a/awx/ui_next/src/components/Lookup/ProjectLookup.jsx +++ b/awx/ui_next/src/components/Lookup/ProjectLookup.jsx @@ -88,7 +88,7 @@ function ProjectLookup({ ], }, { - name: i18n._(t`SCM URL`), + name: i18n._(t`Source Control URL`), key: 'scm_url', }, { diff --git a/awx/ui_next/src/components/PromptDetail/PromptDetail.jsx b/awx/ui_next/src/components/PromptDetail/PromptDetail.jsx index eaf97ec88a..6ea976a0b5 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptDetail.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptDetail.jsx @@ -140,7 +140,7 @@ function PromptDetail({ i18n, resource, launchConfig = {} }) { )} {launchConfig.ask_scm_branch_on_launch && ( )} diff --git a/awx/ui_next/src/components/PromptDetail/PromptDetail.test.jsx b/awx/ui_next/src/components/PromptDetail/PromptDetail.test.jsx index e170bc996c..265d1b227c 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptDetail.test.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptDetail.test.jsx @@ -77,7 +77,7 @@ describe('PromptDetail', () => { assertDetail('Job Type', 'run'); assertDetail('Credential', 'Demo Credential'); assertDetail('Inventory', 'Demo Inventory'); - assertDetail('SCM Branch', '123'); + assertDetail('Source Control Branch', '123'); assertDetail('Limit', '3'); assertDetail('Verbosity', '1 (Verbose)'); assertDetail('Job Tags', 'onetwothree'); @@ -113,7 +113,7 @@ describe('PromptDetail', () => { 'Job Type', 'Credential', 'Inventory', - 'SCM Branch', + 'Source Control Branch', 'Limit', 'Verbosity', 'Job Tags', diff --git a/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.jsx b/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.jsx index d0b2a5774a..577a706d7d 100644 --- a/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.jsx +++ b/awx/ui_next/src/components/PromptDetail/PromptProjectDetail.jsx @@ -50,15 +50,15 @@ function PromptProjectDetail({ i18n, resource }) { return ( <> - - - + + + {summary_fields?.credential?.id && ( { expect(wrapper.find(`Detail[label="${label}"] dd`).text()).toBe(value); } - assertDetail('SCM Type', 'Git'); - assertDetail('SCM URL', 'https://github.com/ansible/ansible-tower-samples'); - assertDetail('SCM Branch', 'foo'); - assertDetail('SCM Refspec', 'refs/'); + assertDetail('Source Control Type', 'Git'); + assertDetail( + 'Source Control URL', + 'https://github.com/ansible/ansible-tower-samples' + ); + assertDetail('Source Control Branch', 'foo'); + assertDetail('Source Control Refspec', 'refs/'); assertDetail('Cache Timeout', '3 Seconds'); assertDetail('Ansible Environment', 'mock virtual env'); assertDetail('Project Base Path', 'dir/foo/bar'); assertDetail('Playbook Directory', '_6__demo_project'); - assertDetail('SCM Credential', 'Scm: mock scm'); + assertDetail('Source Control Credential', 'Scm: mock scm'); expect( wrapper .find('Detail[label="Options"]') diff --git a/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.jsx b/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.jsx index 727496557a..9eed8c8d66 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleDetail/ScheduleDetail.jsx @@ -137,7 +137,10 @@ function ScheduleDetail({ schedule, i18n }) { } /> )} - + {typeof diff_mode === 'boolean' && ( ', () => { expect(wrapper.find('Title[children="Prompted Fields"]').length).toBe(0); expect(wrapper.find('Detail[label="Job Type"]').length).toBe(0); expect(wrapper.find('Detail[label="Inventory"]').length).toBe(0); - expect(wrapper.find('Detail[label="SCM Branch"]').length).toBe(0); + expect(wrapper.find('Detail[label="Source Control Branch"]').length).toBe( + 0 + ); expect(wrapper.find('Detail[label="Limit"]').length).toBe(0); expect(wrapper.find('Detail[label="Show Changes"]').length).toBe(0); expect(wrapper.find('Detail[label="Credentials"]').length).toBe(0); @@ -209,7 +211,7 @@ describe('', () => { expect(wrapper.find('Detail[label="Inventory"]').length).toBe(1); expect( wrapper - .find('Detail[label="SCM Branch"]') + .find('Detail[label="Source Control Branch"]') .find('dd') .text() ).toBe('foo/branch'); diff --git a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx index 6e36a73e16..9d7f34dc03 100644 --- a/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx +++ b/awx/ui_next/src/components/Schedule/ScheduleList/ScheduleListItem.jsx @@ -33,7 +33,7 @@ function ScheduleListItem({ i18n, isSelected, onSelect, schedule }) { const jobTypeLabels = { inventory_update: i18n._(t`Inventory Sync`), job: i18n._(t`Playbook Run`), - project_update: i18n._(t`SCM Update`), + project_update: i18n._(t`Source Control Update`), system_job: i18n._(t`Management Job`), workflow_job: i18n._(t`Workflow Job`), }; diff --git a/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.test.jsx b/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.test.jsx index 4d1abe0672..5b623062fa 100644 --- a/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.test.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialAdd/CredentialAdd.test.jsx @@ -48,7 +48,7 @@ CredentialTypesAPI.read.mockResolvedValue({ }, { id: 'ssh_key_data', - label: 'SCM Private Key', + label: 'Source Control Private Key', type: 'string', format: 'ssh_private_key', secret: true, diff --git a/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.test.jsx b/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.test.jsx index 8a0cbe13d7..e85e2e69ef 100644 --- a/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.test.jsx +++ b/awx/ui_next/src/screens/Credential/CredentialEdit/CredentialEdit.test.jsx @@ -141,7 +141,7 @@ CredentialTypesAPI.read.mockResolvedValue({ }, { id: 'ssh_key_data', - label: 'SCM Private Key', + label: 'Source Control Private Key', type: 'string', format: 'ssh_private_key', secret: true, diff --git a/awx/ui_next/src/screens/Credential/shared/CredentialForm.test.jsx b/awx/ui_next/src/screens/Credential/shared/CredentialForm.test.jsx index 16fc3d3867..11753919e0 100644 --- a/awx/ui_next/src/screens/Credential/shared/CredentialForm.test.jsx +++ b/awx/ui_next/src/screens/Credential/shared/CredentialForm.test.jsx @@ -217,7 +217,7 @@ const credentialTypes = [ }, { id: 'ssh_key_data', - label: 'SCM Private Key', + label: 'Source Control Private Key', type: 'string', format: 'ssh_private_key', secret: true, diff --git a/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx b/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx index a0ef3c5041..4926d72c62 100644 --- a/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx +++ b/awx/ui_next/src/screens/Project/ProjectDetail/ProjectDetail.jsx @@ -100,17 +100,17 @@ function ProjectDetail({ project, i18n }) { /> )} - - - + + + {summary_fields.credential && ( ', () => { assertDetail('Name', mockProject.name); assertDetail('Description', mockProject.description); assertDetail('Organization', mockProject.summary_fields.organization.name); - assertDetail('SCM Type', 'Git'); - assertDetail('SCM URL', mockProject.scm_url); - assertDetail('SCM Branch', mockProject.scm_branch); - assertDetail('SCM Refspec', mockProject.scm_refspec); + assertDetail('Source Control Type', 'Git'); + assertDetail('Source Control URL', mockProject.scm_url); + assertDetail('Source Control Branch', mockProject.scm_branch); + assertDetail('Source Control Refspec', mockProject.scm_refspec); assertDetail( - 'SCM Credential', + 'Source Control Credential', `Scm: ${mockProject.summary_fields.credential.name}` ); assertDetail( diff --git a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx index 8fbf43bc4a..7a946ac679 100644 --- a/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx +++ b/awx/ui_next/src/screens/Project/ProjectList/ProjectList.jsx @@ -125,7 +125,7 @@ function ProjectList({ i18n }) { ], }, { - name: i18n._(t`SCM URL`), + name: i18n._(t`Source Control URL`), key: 'scm_url', }, { diff --git a/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx index c08631880e..d37de3ef65 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectForm.jsx @@ -170,7 +170,7 @@ function ProjectFormFields({ helperTextInvalid={scmTypeMeta.error} isRequired isValid={!scmTypeMeta.touched || !scmTypeMeta.error} - label={i18n._(t`SCM Type`)} + label={i18n._(t`Source Control Credential Type`)} > { diff --git a/awx/ui_next/src/screens/Project/shared/ProjectForm.test.jsx b/awx/ui_next/src/screens/Project/shared/ProjectForm.test.jsx index 7872da4df3..a7680921f2 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectForm.test.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectForm.test.jsx @@ -119,7 +119,9 @@ describe('', () => { expect(wrapper.find('FormGroup[label="Name"]').length).toBe(1); expect(wrapper.find('FormGroup[label="Description"]').length).toBe(1); expect(wrapper.find('FormGroup[label="Organization"]').length).toBe(1); - expect(wrapper.find('FormGroup[label="SCM Type"]').length).toBe(1); + expect( + wrapper.find('FormGroup[label="Source Control Credential Type"]').length + ).toBe(1); expect(wrapper.find('FormGroup[label="Ansible Environment"]').length).toBe( 1 ); @@ -140,12 +142,18 @@ describe('', () => { ); }); wrapper.update(); - expect(wrapper.find('FormGroup[label="SCM URL"]').length).toBe(1); + expect(wrapper.find('FormGroup[label="Source Control URL"]').length).toBe( + 1 + ); expect( - wrapper.find('FormGroup[label="SCM Branch/Tag/Commit"]').length + wrapper.find('FormGroup[label="Source Control Branch/Tag/Commit"]').length + ).toBe(1); + expect( + wrapper.find('FormGroup[label="Source Control Refspec"]').length + ).toBe(1); + expect( + wrapper.find('FormGroup[label="Source Control Credential"]').length ).toBe(1); - expect(wrapper.find('FormGroup[label="SCM Refspec"]').length).toBe(1); - expect(wrapper.find('FormGroup[label="SCM Credential"]').length).toBe(1); expect(wrapper.find('FormGroup[label="Options"]').length).toBe(1); }); @@ -184,7 +192,7 @@ describe('', () => { }); }); - test('should display insights credential lookup when scm type is "insights"', async () => { + test('should display insights credential lookup when source control type is "insights"', async () => { await act(async () => { wrapper = mountWithContexts( @@ -268,7 +276,7 @@ describe('', () => { expect(wrapper.find('ManualSubForm Alert').length).toBe(1); }); - test('should reset scm subform values when scm type changes', async () => { + test('should reset source control subform values when source control type changes', async () => { await act(async () => { wrapper = mountWithContexts( ', () => { }); await waitForElement(wrapper, 'ContentLoading', el => el.length === 0); + console.log(wrapper.debug()); + const scmTypeSelect = wrapper.find( - 'FormGroup[label="SCM Type"] FormSelect' + 'FormGroup[label="Source Control Credential Type"] FormSelect' ); await act(async () => { scmTypeSelect.invoke('onChange')('hg', { target: { name: 'Mercurial' } }); }); wrapper.update(); await act(async () => { - wrapper.find('FormGroup[label="SCM URL"] input').simulate('change', { - target: { value: 'baz', name: 'scm_url' }, - }); + wrapper + .find('FormGroup[label="Source Control URL"] input') + .simulate('change', { + target: { value: 'baz', name: 'scm_url' }, + }); }); wrapper.update(); expect(wrapper.find('input#project-scm-url').prop('value')).toEqual('baz'); diff --git a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx index 3b5929b508..21695e45d9 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/GitSubForm.jsx @@ -20,7 +20,7 @@ const GitSubForm = ({ i18n={i18n} tooltip={ - {i18n._(t`Example URLs for GIT SCM include:`)} + {i18n._(t`Example URLs for GIT Source Control include:`)}
  • https://github.com/ansible/ansible.git
  • git@github.com:ansible/ansible.git
  • @@ -35,10 +35,13 @@ const GitSubForm = ({ } /> - + - {i18n._(t`Example URLs for Mercurial SCM include:`)} + {i18n._(t`Example URLs for Mercurial Source Control include:`)}
    • https://bitbucket.org/username/project
    • ssh://hg@bitbucket.org/username/project
    • @@ -32,7 +32,10 @@ const HgSubForm = ({ } /> - + )} ( ( label={label} tooltip={i18n._(t`Branch to checkout. In addition to branches, you can input tags, commit hashes, and arbitrary refs. Some - commit hashes and refs may not be availble unless you also + commit hashes and refs may not be available unless you also provide a custom refspec.`)} /> )); @@ -44,7 +44,7 @@ export const ScmCredentialFormField = withI18n()( return ( { onCredentialSelection('scm', value); @@ -94,7 +94,7 @@ export const ScmTypeOptions = withI18n()( name="allow_override" label={i18n._(t`Allow Branch Override`)} tooltip={i18n._( - t`Allow changing the SCM branch or revision in a job + t`Allow changing the Source Control branch or revision in a job template that uses this project.` )} /> diff --git a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/SvnSubForm.jsx b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/SvnSubForm.jsx index 2b63c13f96..c747b76bfe 100644 --- a/awx/ui_next/src/screens/Project/shared/ProjectSubForms/SvnSubForm.jsx +++ b/awx/ui_next/src/screens/Project/shared/ProjectSubForms/SvnSubForm.jsx @@ -19,7 +19,7 @@ const SvnSubForm = ({ i18n={i18n} tooltip={ - {i18n._(t`Example URLs for Subversion SCM include:`)} + {i18n._(t`Example URLs for Subversion Source Control include:`)}
      • https://github.com/ansible/ansible
      • svn://servername.example.com/path
      • diff --git a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx index 627dacb9d7..baa6407bc6 100644 --- a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx +++ b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.jsx @@ -206,7 +206,10 @@ function JobTemplateDetail({ i18n, template }) { ) : ( renderMissingDataDetail(i18n._(t`Project`)) )} - + diff --git a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.test.jsx b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.test.jsx index 6be3c3af47..4ba33ac5c0 100644 --- a/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.test.jsx +++ b/awx/ui_next/src/screens/Template/JobTemplateDetail/JobTemplateDetail.test.jsx @@ -82,8 +82,8 @@ describe('', () => { }); }); - test('should render SCM_Branch', async () => { - const SCMBranch = wrapper.find('Detail[label="SCM Branch"]'); + test('should render Source Control Branch', async () => { + const SCMBranch = wrapper.find('Detail[label="Source Control Branch"]'); expect(SCMBranch.prop('value')).toBe('Foo branch'); }); diff --git a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx index 2d10e552d1..370cbb8abd 100644 --- a/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx +++ b/awx/ui_next/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeTypeStep/ProjectsList.jsx @@ -78,7 +78,7 @@ function ProjectsList({ history, i18n, nodeResource, onUpdateNodeResource }) { ], }, { - name: i18n._(t`SCM URL`), + name: i18n._(t`Source Control URL`), key: 'scm_url', }, { diff --git a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx index 1ac83b4211..f4ff89fd6c 100644 --- a/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx +++ b/awx/ui_next/src/screens/Template/shared/JobTemplateForm.jsx @@ -270,7 +270,7 @@ function JobTemplateForm({ {project?.allow_override && ( diff --git a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.jsx b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.jsx index d3e0b65879..1079f9a5dd 100644 --- a/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.jsx +++ b/awx/ui_next/src/screens/Template/shared/WorkflowJobTemplateForm.jsx @@ -288,7 +288,7 @@ function WorkflowJobTemplateForm({ />