diff --git a/src/components/BulkEditList/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/helpers.js b/src/components/BulkEditList/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/helpers.js index b0c30b1c..5f4df0e1 100644 --- a/src/components/BulkEditList/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/helpers.js +++ b/src/components/BulkEditList/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/helpers.js @@ -293,7 +293,7 @@ export const getDefaultActions = (option, options, formatMessage) => { ], }; - case OPTIONS.URL_RELATIONSHIP: + case OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP: return { type: '', actions: [ @@ -307,7 +307,7 @@ export const getDefaultActions = (option, options, formatMessage) => { ], }; - case OPTIONS.URI: + case OPTIONS.ELECTRONIC_ACCESS_URI: return { type: '', actions: [ @@ -388,7 +388,7 @@ export const getExtraActions = (option, action, formattedMessage) => { switch (`${option}-${action}`) { case `${OPTIONS.ITEM_NOTE}-${ACTIONS.FIND}`: case `${OPTIONS.ADMINISTRATIVE_NOTE}-${ACTIONS.FIND}`: - case `${OPTIONS.URI}-${ACTIONS.FIND}`: + case `${OPTIONS.ELECTRONIC_ACCESS_URI}-${ACTIONS.FIND}`: case `${OPTIONS.CHECK_IN_NOTE}-${ACTIONS.FIND}`: case `${OPTIONS.CHECK_OUT_NOTE}-${ACTIONS.FIND}`: case `${OPTIONS.HOLDINGS_NOTE}-${ACTIONS.FIND}`: @@ -399,7 +399,7 @@ export const getExtraActions = (option, action, formattedMessage) => { [FIELD_VALUE_KEY]: '', }]; - case `${OPTIONS.URL_RELATIONSHIP}-${ACTIONS.FIND}`: + case `${OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP}-${ACTIONS.FIND}`: return [{ actionsList: commonAdditionalActions(formattedMessage), controlType: () => CONTROL_TYPES.ELECTRONIC_ACCESS_RELATIONSHIP_SELECT, diff --git a/src/components/BulkEditList/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/helpers.test.js b/src/components/BulkEditList/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/helpers.test.js index 2ec710f3..22a0caf4 100644 --- a/src/components/BulkEditList/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/helpers.test.js +++ b/src/components/BulkEditList/BulkEditListResult/BulkEditInApp/ContentUpdatesForm/helpers.test.js @@ -615,8 +615,8 @@ describe('ContentUpdatesForm helpers', () => { ); }); - it('returns the correct object for the URL_RELATIONSHIP option', () => { - expect(JSON.stringify(getDefaultActions(OPTIONS.URL_RELATIONSHIP, [], formatMessage))) + it('returns the correct object for the ELECTRONIC_ACCESS_URL_RELATIONSHIP option', () => { + expect(JSON.stringify(getDefaultActions(OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP, [], formatMessage))) .toEqual( JSON.stringify({ type: '', @@ -654,8 +654,8 @@ describe('ContentUpdatesForm helpers', () => { ); }); - it('returns the correct object for the URI option', () => { - expect(JSON.stringify(getDefaultActions(OPTIONS.URI, [], formatMessage))) + it('returns the correct object for the ELECTRONIC_ACCESS_URI option', () => { + expect(JSON.stringify(getDefaultActions(OPTIONS.ELECTRONIC_ACCESS_URI, [], formatMessage))) .toEqual( JSON.stringify({ type: '', @@ -746,7 +746,7 @@ describe('ContentUpdatesForm helpers', () => { it('should return a certain structure for specific OPTIONS and ACTIONS - URL Relationship', () => { const optionActionCombinations = [ { - option: OPTIONS.URL_RELATIONSHIP, + option: OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP, action: ACTIONS.FIND }, ]; diff --git a/src/constants/selectOptions.js b/src/constants/selectOptions.js index 334609e8..daaeae83 100644 --- a/src/constants/selectOptions.js +++ b/src/constants/selectOptions.js @@ -23,8 +23,8 @@ export const OPTIONS = { ADMINISTRATIVE_NOTE: 'ADMINISTRATIVE_NOTE', CHECK_IN_NOTE: 'CHECK_IN_NOTE', CHECK_OUT_NOTE: 'CHECK_OUT_NOTE', - URI: 'URI', - URL_RELATIONSHIP: 'URL_RELATIONSHIP', + ELECTRONIC_ACCESS_URI: 'ELECTRONIC_ACCESS_URI', + ELECTRONIC_ACCESS_URL_RELATIONSHIP: 'ELECTRONIC_ACCESS_URL_RELATIONSHIP', }; export const PARAMETERS_KEYS = { @@ -206,13 +206,13 @@ export const getHoldingsOptions = (formatMessage, holdingsNotes = []) => [ }, ...holdingsNotes, { - value: OPTIONS.URI, + value: OPTIONS.ELECTRONIC_ACCESS_URI, label: formatMessage({ id: 'ui-bulk-edit.layer.options.holdings.uri' }), disabled: false, categoryName: formatMessage({ id: 'ui-bulk-edit.category.electronicAccess' }), }, { - value: OPTIONS.URL_RELATIONSHIP, + value: OPTIONS.ELECTRONIC_ACCESS_URL_RELATIONSHIP, label: formatMessage({ id: 'ui-bulk-edit.layer.options.holdings.urlRelationship' }), disabled: false, categoryName: formatMessage({ id: 'ui-bulk-edit.category.electronicAccess' }),