Skip to content

Commit a155b08

Browse files
committed
Bug 2024708: Don't use lodash startCase on default operand field labels
Remove lodash startCase from fallback operand form field labels. The fallback label is the field name from the schema, which should be displayed as-is.
1 parent aefad84 commit a155b08

File tree

2 files changed

+3
-3
lines changed
  • frontend/packages

2 files changed

+3
-3
lines changed

frontend/packages/console-shared/src/components/dynamic-form/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const useSchemaLabel = (schema: JSONSchema7, uiSchema: UiSchema, defaultL
1818
const options = getUiOptions(uiSchema ?? {});
1919
const showLabel = options?.label ?? true;
2020
const label = (options?.title || schema?.title) as string;
21-
return [showLabel, label || _.startCase(defaultLabel)] as [boolean, string];
21+
return [showLabel, label || defaultLabel] as [boolean, string];
2222
};
2323

2424
export const useSchemaDescription = (

frontend/packages/operator-lifecycle-manager/integration-tests-cypress/tests/descriptors.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ describe('Using OLM descriptor components', () => {
156156
cy.get(`#${FIELD_GROUP_ID}_accordion-toggle`)
157157
.should('exist')
158158
.click();
159-
cy.get(`[for="${FIELD_GROUP_ID}_itemOne"]`).should('have.text', 'Item One');
159+
cy.get(`[for="${FIELD_GROUP_ID}_itemOne"]`).should('have.text', 'itemOne');
160160
cy.get(`#${FIELD_GROUP_ID}_itemOne`).should('have.value', testCR.spec.fieldGroup.itemOne);
161-
cy.get(`[for="${FIELD_GROUP_ID}_itemTwo"]`).should('have.text', 'Item Two');
161+
cy.get(`[for="${FIELD_GROUP_ID}_itemTwo"]`).should('have.text', 'itemTwo');
162162
cy.get(`#${FIELD_GROUP_ID}_itemTwo`).should('have.value', testCR.spec.fieldGroup.itemTwo);
163163
});
164164

0 commit comments

Comments
 (0)