Add scm refspec to project detail and remove org id from top level shared component

This commit is contained in:
Marliana Lara 2019-10-28 10:25:10 -04:00
parent e4bde24f38
commit 31fdd5e85c
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
3 changed files with 5 additions and 2 deletions

View File

@ -101,7 +101,7 @@ class MultiCredentialsLookup extends React.Component {
const { selectedCredentialType, credentialTypes } = this.state;
const { tooltip, i18n, credentials } = this.props;
return (
<FormGroup label={i18n._(t`Credentials`)} fieldId="org-credentials">
<FormGroup label={i18n._(t`Credentials`)} fieldId="multiCredential">
{tooltip && (
<Tooltip position="right" content={tooltip}>
<QuestionCircleIcon />
@ -114,7 +114,7 @@ class MultiCredentialsLookup extends React.Component {
selectedCategory={selectedCredentialType}
onToggleItem={this.toggleCredentialSelection}
onloadCategories={this.loadCredentialTypes}
id="org-credentials"
id="multiCredential"
lookupHeader={i18n._(t`Credentials`)}
name="credentials"
value={credentials}

View File

@ -30,6 +30,7 @@ function ProjectDetail({ project, i18n }) {
scm_branch,
scm_clean,
scm_delete_on_update,
scm_refspec,
scm_type,
scm_update_on_launch,
scm_update_cache_timeout,
@ -98,6 +99,7 @@ function ProjectDetail({ project, i18n }) {
<Detail label={i18n._(t`SCM Type`)} value={scm_type} />
<Detail label={i18n._(t`SCM URL`)} value={scm_url} />
<Detail label={i18n._(t`SCM Branch`)} value={scm_branch} />
<Detail label={i18n._(t`SCM Refspec`)} value={scm_refspec} />
{summary_fields.credential && (
<Detail
label={i18n._(t`SCM Credential`)}

View File

@ -88,6 +88,7 @@ describe('<ProjectDetail />', () => {
assertDetail('SCM Type', mockProject.scm_type);
assertDetail('SCM URL', mockProject.scm_url);
assertDetail('SCM Branch', mockProject.scm_branch);
assertDetail('SCM Refspec', mockProject.scm_refspec);
assertDetail(
'SCM Credential',
`Scm: ${mockProject.summary_fields.credential.name}`