Merge pull request #10185 from jakemcdermott/fix-10170

Drop the word 'name' from image field, add examples

for #10170
We call this field "Image" in other places, so we want it to match. Also, "Image name" can be confusing because people may think they just need to provide the image name instead of the full image location, which includes registry and tag version.
cc @gamuniz @nixocio @beeankha @tiagodread

Reviewed-by: Kersom <None>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Julen Landa Alustiza <None>
This commit is contained in:
softwarefactory-project-zuul[bot]
2021-05-13 14:44:38 +00:00
committed by GitHub
4 changed files with 41 additions and 4 deletions
@@ -95,12 +95,27 @@ function ExecutionEnvironmentFormFields({
/>
<FormField
id="execution-environment-image"
label={t`Image name`}
label={t`Image`}
name="image"
type="text"
validate={required(null)}
isRequired
tooltip={t`The registry location where the container is stored.`}
tooltip={
<span>
{t`The full image location, including the container registry, image name, and version tag.`}
<br />
<br />
{t`Examples:`}
<ul css="margin: 10px 0 10px 20px">
<li>
<code>quay.io/ansible/awx-ee:latest</code>
</li>
<li>
<code>repo/project/image-name:tag</code>
</li>
</ul>
</span>
}
/>
<FormGroup
fieldId="execution-environment-container-options"
@@ -152,7 +152,7 @@ describe('<ExecutionEnvironmentForm/>', () => {
});
test('should display form fields properly', () => {
expect(wrapper.find('FormGroup[label="Image name"]').length).toBe(1);
expect(wrapper.find('FormGroup[label="Image"]').length).toBe(1);
expect(wrapper.find('FormGroup[label="Description"]').length).toBe(1);
expect(wrapper.find('CredentialLookup').length).toBe(1);
});