Merge pull request #9742 from nixocio/ui_improve_ee_details

Add managed by tower as part of the EE details page

Add managed by tower as part of the EE details page.
See: #8171

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-03-29 21:42:21 +00:00 committed by GitHub
commit 8673631e64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -64,6 +64,11 @@ function ExecutionEnvironmentDetails({ executionEnvironment, i18n }) {
value={description}
dataCy="execution-environment-detail-description"
/>
<Detail
label={i18n._(t`Managed by Tower`)}
value={managedByTower ? i18n._(t`True`) : i18n._(t`False`)}
dataCy="execution-environment-managed-by-tower"
/>
<Detail
label={i18n._(t`Organization`)}
value={
@ -79,6 +84,7 @@ function ExecutionEnvironmentDetails({ executionEnvironment, i18n }) {
}
dataCy="execution-environment-detail-organization"
/>
<Detail
label={i18n._(t`Pull`)}
value={pull === '' ? i18n._(t`Missing`) : toTitleCase(pull)}

View File

@ -73,6 +73,9 @@ describe('<ExecutionEnvironmentDetails/>', () => {
expect(
wrapper.find('Detail[label="Credential"]').prop('value').props.children
).toEqual(executionEnvironment.summary_fields.credential.name);
expect(
wrapper.find('Detail[label="Managed by Tower"]').prop('value')
).toEqual('False');
const dates = wrapper.find('UserDateDetail');
expect(dates).toHaveLength(2);
expect(dates.at(0).prop('date')).toEqual(executionEnvironment.created);
@ -167,6 +170,9 @@ describe('<ExecutionEnvironmentDetails/>', () => {
expect(
wrapper.find('Detail[label="Credential"]').prop('value').props.children
).toEqual(executionEnvironment.summary_fields.credential.name);
expect(
wrapper.find('Detail[label="Managed by Tower"]').prop('value')
).toEqual('True');
const dates = wrapper.find('UserDateDetail');
expect(dates).toHaveLength(2);
expect(dates.at(0).prop('date')).toEqual(executionEnvironment.created);