From 4b61780e9b70b0339faa2051216ab36de4cf4495 Mon Sep 17 00:00:00 2001 From: srwang <12386424+srwang@users.noreply.github.com> Date: Thu, 25 Aug 2022 03:53:12 -0400 Subject: [PATCH] Revert "feat: added dropdown fields to EditCourseForm.jsx (#764)" (#771) This reverts commit 86f73ea18d7a2c131f1146eab3bfcd4fdb0edaaa. --- .../CreateCourseRunPage.test.jsx.snap | 124 ---- .../EditCoursePage/EditCourseForm.jsx | 61 -- .../EditCoursePage/EditCourseForm.test.jsx | 7 - .../EditCoursePage/EditCoursePage.test.jsx | 28 - .../EditCourseForm.test.jsx.snap | 575 ------------------ .../EditCoursePage.test.jsx.snap | 281 --------- src/components/EditCoursePage/index.jsx | 23 - .../updated-paragon-component.jsx | 71 --- src/data/constants/testData.js | 32 - 9 files changed, 1202 deletions(-) delete mode 100644 src/components/RenderSelectField/updated-paragon-component.jsx diff --git a/src/components/CreateCourseRunPage/__snapshots__/CreateCourseRunPage.test.jsx.snap b/src/components/CreateCourseRunPage/__snapshots__/CreateCourseRunPage.test.jsx.snap index d2a6a0609..002ea854c 100644 --- a/src/components/CreateCourseRunPage/__snapshots__/CreateCourseRunPage.test.jsx.snap +++ b/src/components/CreateCourseRunPage/__snapshots__/CreateCourseRunPage.test.jsx.snap @@ -35,68 +35,6 @@ exports[`CreateCourseRunPage renders html correctly 1`] = ` }, ], }, - "location_restriction": Object { - "children": Object { - "countries": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Afghanistan", - "value": "AF", - }, - Object { - "label": "Åland Islands", - "value": "AX", - }, - Object { - "label": "Algeria", - "value": "DZ", - }, - Object { - "label": "American Samoa", - "value": "AS", - }, - Object { - "label": "Andorra", - "value": "AD", - }, - ], - }, - }, - "restriction_type": Object { - "choices": Array [ - "blocklist", - "allowlist", - ], - }, - "states": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Alabama", - "value": "AL", - }, - Object { - "label": "Arizona", - "value": "AZ", - }, - Object { - "label": "Arkansas", - "value": "AR", - }, - Object { - "label": "California", - "value": "CA", - }, - Object { - "label": "Colorado", - "value": "CO", - }, - ], - }, - }, - }, - }, "subjects": Object { "child": Object { "choices": Array [ @@ -566,68 +504,6 @@ exports[`CreateCourseRunPage renders html correctly with Course Type 1`] = ` }, ], }, - "location_restriction": Object { - "children": Object { - "countries": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Afghanistan", - "value": "AF", - }, - Object { - "label": "Åland Islands", - "value": "AX", - }, - Object { - "label": "Algeria", - "value": "DZ", - }, - Object { - "label": "American Samoa", - "value": "AS", - }, - Object { - "label": "Andorra", - "value": "AD", - }, - ], - }, - }, - "restriction_type": Object { - "choices": Array [ - "blocklist", - "allowlist", - ], - }, - "states": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Alabama", - "value": "AL", - }, - Object { - "label": "Arizona", - "value": "AZ", - }, - Object { - "label": "Arkansas", - "value": "AR", - }, - Object { - "label": "California", - "value": "CA", - }, - Object { - "label": "Colorado", - "value": "CO", - }, - ], - }, - }, - }, - }, "subjects": Object { "child": Object { "choices": Array [ diff --git a/src/components/EditCoursePage/EditCourseForm.jsx b/src/components/EditCoursePage/EditCourseForm.jsx index a33efce16..b2f5d2488 100644 --- a/src/components/EditCoursePage/EditCourseForm.jsx +++ b/src/components/EditCoursePage/EditCourseForm.jsx @@ -16,9 +16,6 @@ import FieldLabel from '../FieldLabel'; import ImageUpload from '../ImageUpload'; import RenderInputTextField from '../RenderInputTextField'; import RenderSelectField from '../RenderSelectField'; -// TODO: remove RenderSelectFieldNew when migrating off deprecated Paragon components, -// i.e. as a part of https://github.com/openedx/frontend-app-publisher/pull/761 -import RenderSelectFieldNew from '../RenderSelectField/updated-paragon-component'; import RichEditor from '../RichEditor'; import Pill from '../Pill'; import Collapsible from '../Collapsible'; @@ -239,12 +236,6 @@ export class BaseEditCourseForm extends React.Component { && parseOptions(courseRunOptionsData.content_language.choices)); const programOptions = (courseRunOptionsData && parseOptions(courseRunOptionsData.expected_program_type.choices)); - const locationCountryOptions = courseOptionsData - && parseOptions(courseOptionsData.location_restriction.children.countries.child.choices); - const locationRestrictionTypeOptions = courseOptionsData - && parseOptions(courseOptionsData.location_restriction.children.restriction_type.choices); - const locationStateOptions = courseOptionsData - && parseOptions(courseOptionsData.location_restriction.children.states.child.choices); const { data: { @@ -944,53 +935,6 @@ export class BaseEditCourseForm extends React.Component { disabled={disabled} optional /> - {administrator && ( - <> - - - )} - extraInput={{ onInvalid: this.openCollapsible }} - options={locationRestrictionTypeOptions} - required={false} - disabled={disabled} - /> - - )} - extraInput={{ onInvalid: this.openCollapsible, multiple: true }} - options={locationCountryOptions} - disabled={disabled} - required={false} - /> - - )} - extraInput={{ onInvalid: this.openCollapsible, multiple: true }} - options={locationStateOptions} - disabled={disabled} - required={false} - /> - - )} {administrator && ( <> { skill_names: [], organization_logo_override: 'http://image.src.small', organization_short_code_override: 'test short code', - location_restriction: { - restriction_type: 'allowlist', - countries: [ - 'AF', 'AX', - ], - states: ['CO'], - }, in_year_value: { per_click_usa: 100, per_click_international: 100, diff --git a/src/components/EditCoursePage/EditCoursePage.test.jsx b/src/components/EditCoursePage/EditCoursePage.test.jsx index a55ca5129..9ed6a764d 100644 --- a/src/components/EditCoursePage/EditCoursePage.test.jsx +++ b/src/components/EditCoursePage/EditCoursePage.test.jsx @@ -154,13 +154,6 @@ describe('EditCoursePage', () => { skill_names: [], organization_logo_override_url: 'http://image.src.small', organization_short_code_override: 'test short code', - location_restriction: { - restriction_type: 'allowlist', - countries: [ - 'AF', 'AX', - ], - states: ['AL'], - }, }, showCreateStatusAlert: false, isFetching: false, @@ -364,13 +357,6 @@ describe('EditCoursePage', () => { imageSrc: 'http://image.jpg', learner_testimonials: '

I learned stuff!

', level_type: 'Basic', - location_restriction: { - restriction_type: 'allowlist', - countries: [ - 'AF', 'AX', - ], - states: ['AL'], - }, organization_logo_override_url: 'http://image.src.small', organization_short_code_override: 'test short code', outcome: '

Stuff

', @@ -399,13 +385,6 @@ describe('EditCoursePage', () => { key: 'edX+Test101x', learner_testimonials: '

I learned stuff!

', level_type: 'Basic', - location_restriction: { - restriction_type: 'allowlist', - countries: [ - 'AF', 'AX', - ], - states: ['AL'], - }, organization_logo_override: 'http://image.src.small', organization_short_code_override: 'test short code', outcome: '

Stuff

', @@ -929,13 +908,6 @@ describe('EditCoursePage', () => { key: 'edX+Test101x', learner_testimonials: '

I learned stuff!

', level_type: 'Basic', - location_restriction: { - restriction_type: 'allowlist', - countries: [ - 'AF', 'AX', - ], - states: ['AL'], - }, organization_logo_override: 'http://image.src.small', organization_short_code_override: 'test short code', outcome: '

Stuff

', diff --git a/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap b/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap index e4bbb9158..14297bae4 100644 --- a/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap +++ b/src/components/EditCoursePage/__snapshots__/EditCourseForm.test.jsx.snap @@ -1044,68 +1044,6 @@ exports[`BaseEditCourseForm renders correctly when submitting for review 1`] = ` }, ], }, - "location_restriction": Object { - "children": Object { - "countries": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Afghanistan", - "value": "AF", - }, - Object { - "label": "Åland Islands", - "value": "AX", - }, - Object { - "label": "Algeria", - "value": "DZ", - }, - Object { - "label": "American Samoa", - "value": "AS", - }, - Object { - "label": "Andorra", - "value": "AD", - }, - ], - }, - }, - "restriction_type": Object { - "choices": Array [ - "blocklist", - "allowlist", - ], - }, - "states": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Alabama", - "value": "AL", - }, - Object { - "label": "Arizona", - "value": "AZ", - }, - Object { - "label": "Arkansas", - "value": "AR", - }, - Object { - "label": "California", - "value": "CA", - }, - Object { - "label": "Colorado", - "value": "CO", - }, - ], - }, - }, - }, - }, "subjects": Object { "child": Object { "choices": Array [ @@ -1527,16 +1465,6 @@ exports[`BaseEditCourseForm renders correctly when submitting for review 1`] = ` }, "learner_testimonials": "learner testimonials", "level_type": "advanced", - "location_restriction": Object { - "countries": Array [ - "AF", - "AX", - ], - "restriction_type": "allowlist", - "states": Array [ - "CO", - ], - }, "organization_logo_override": "http://image.src.small", "organization_short_code_override": "test short code", "outcome": "learning outcomes", @@ -2726,68 +2654,6 @@ exports[`BaseEditCourseForm renders html correctly while submitting 1`] = ` }, ], }, - "location_restriction": Object { - "children": Object { - "countries": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Afghanistan", - "value": "AF", - }, - Object { - "label": "Åland Islands", - "value": "AX", - }, - Object { - "label": "Algeria", - "value": "DZ", - }, - Object { - "label": "American Samoa", - "value": "AS", - }, - Object { - "label": "Andorra", - "value": "AD", - }, - ], - }, - }, - "restriction_type": Object { - "choices": Array [ - "blocklist", - "allowlist", - ], - }, - "states": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Alabama", - "value": "AL", - }, - Object { - "label": "Arizona", - "value": "AZ", - }, - Object { - "label": "Arkansas", - "value": "AR", - }, - Object { - "label": "California", - "value": "CA", - }, - Object { - "label": "Colorado", - "value": "CO", - }, - ], - }, - }, - }, - }, "subjects": Object { "child": Object { "choices": Array [ @@ -3209,16 +3075,6 @@ exports[`BaseEditCourseForm renders html correctly while submitting 1`] = ` }, "learner_testimonials": "learner testimonials", "level_type": "advanced", - "location_restriction": Object { - "countries": Array [ - "AF", - "AX", - ], - "restriction_type": "allowlist", - "states": Array [ - "CO", - ], - }, "organization_logo_override": "http://image.src.small", "organization_short_code_override": "test short code", "outcome": "learning outcomes", @@ -3262,16 +3118,6 @@ exports[`BaseEditCourseForm renders html correctly while submitting 1`] = ` }, "learner_testimonials": "learner testimonials", "level_type": "advanced", - "location_restriction": Object { - "countries": Array [ - "AF", - "AX", - ], - "restriction_type": "allowlist", - "states": Array [ - "CO", - ], - }, "organization_logo_override": "http://image.src.small", "organization_short_code_override": "test short code", "outcome": "learning outcomes", @@ -4495,139 +4341,6 @@ exports[`BaseEditCourseForm renders html correctly with administrator being true requiredHeight={110} requiredWidth={110} /> - - - } - name="location_restriction.restriction_type" - options={ - Array [ - Object { - "label": undefined, - "value": undefined, - }, - Object { - "label": undefined, - "value": undefined, - }, - ] - } - required={false} - /> - - } - name="location_restriction.countries" - options={ - Array [ - Object { - "label": undefined, - "value": "AF", - }, - Object { - "label": undefined, - "value": "AX", - }, - Object { - "label": undefined, - "value": "DZ", - }, - Object { - "label": undefined, - "value": "AS", - }, - Object { - "label": undefined, - "value": "AD", - }, - ] - } - required={false} - /> - - } - name="location_restriction.states" - options={ - Array [ - Object { - "label": undefined, - "value": "AL", - }, - Object { - "label": undefined, - "value": "AZ", - }, - Object { - "label": undefined, - "value": "AR", - }, - Object { - "label": undefined, - "value": "CA", - }, - Object { - "label": undefined, - "value": "CO", - }, - ] - } - required={false} - /> learn

", @@ -609,16 +594,6 @@ exports[`EditCoursePage renders page correctly with courseInfo 1`] = ` }, "learner_testimonials": null, "level_type": "intermediate", - "location_restriction": Object { - "countries": Array [ - "AF", - "AX", - ], - "restriction_type": "allowlist", - "states": Array [ - "AL", - ], - }, "organization_logo_override_url": "http://image.src.small", "organization_short_code_override": "test short code", "outcome": "

learn

", @@ -853,16 +828,6 @@ exports[`EditCoursePage renders page correctly with courseInfo and courseOptions "key": "edX+Test101x", "learner_testimonials": null, "level_type": "intermediate", - "location_restriction": Object { - "countries": Array [ - "AF", - "AX", - ], - "restriction_type": "allowlist", - "states": Array [ - "AL", - ], - }, "organization_logo_override_url": "http://image.src.small", "organization_short_code_override": "test short code", "outcome": "

learn

", @@ -925,68 +890,6 @@ exports[`EditCoursePage renders page correctly with courseInfo and courseOptions }, ], }, - "location_restriction": Object { - "children": Object { - "countries": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Afghanistan", - "value": "AF", - }, - Object { - "label": "Åland Islands", - "value": "AX", - }, - Object { - "label": "Algeria", - "value": "DZ", - }, - Object { - "label": "American Samoa", - "value": "AS", - }, - Object { - "label": "Andorra", - "value": "AD", - }, - ], - }, - }, - "restriction_type": Object { - "choices": Array [ - "blocklist", - "allowlist", - ], - }, - "states": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Alabama", - "value": "AL", - }, - Object { - "label": "Arizona", - "value": "AZ", - }, - Object { - "label": "Arkansas", - "value": "AR", - }, - Object { - "label": "California", - "value": "CA", - }, - Object { - "label": "Colorado", - "value": "CO", - }, - ], - }, - }, - }, - }, "subjects": Object { "child": Object { "choices": Array [ @@ -1423,16 +1326,6 @@ exports[`EditCoursePage renders page correctly with courseInfo and courseOptions }, "learner_testimonials": null, "level_type": "intermediate", - "location_restriction": Object { - "countries": Array [ - "AF", - "AX", - ], - "restriction_type": "allowlist", - "states": Array [ - "AL", - ], - }, "organization_logo_override_url": "http://image.src.small", "organization_short_code_override": "test short code", "outcome": "

learn

", @@ -1604,11 +1497,6 @@ exports[`EditCoursePage renders page correctly with courseInfo error 1`] = ` }, "learner_testimonials": undefined, "level_type": undefined, - "location_restriction": Object { - "countries": null, - "restriction_type": null, - "states": null, - }, "organization_logo_override_url": undefined, "organization_short_code_override": undefined, "outcome": undefined, @@ -1852,16 +1740,6 @@ exports[`EditCoursePage renders page correctly with courseInfo, courseOptions, a "key": "edX+Test101x", "learner_testimonials": null, "level_type": "intermediate", - "location_restriction": Object { - "countries": Array [ - "AF", - "AX", - ], - "restriction_type": "allowlist", - "states": Array [ - "AL", - ], - }, "organization_logo_override_url": "http://image.src.small", "organization_short_code_override": "test short code", "outcome": "

learn

", @@ -1924,68 +1802,6 @@ exports[`EditCoursePage renders page correctly with courseInfo, courseOptions, a }, ], }, - "location_restriction": Object { - "children": Object { - "countries": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Afghanistan", - "value": "AF", - }, - Object { - "label": "Åland Islands", - "value": "AX", - }, - Object { - "label": "Algeria", - "value": "DZ", - }, - Object { - "label": "American Samoa", - "value": "AS", - }, - Object { - "label": "Andorra", - "value": "AD", - }, - ], - }, - }, - "restriction_type": Object { - "choices": Array [ - "blocklist", - "allowlist", - ], - }, - "states": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Alabama", - "value": "AL", - }, - Object { - "label": "Arizona", - "value": "AZ", - }, - Object { - "label": "Arkansas", - "value": "AR", - }, - Object { - "label": "California", - "value": "CA", - }, - Object { - "label": "Colorado", - "value": "CO", - }, - ], - }, - }, - }, - }, "subjects": Object { "child": Object { "choices": Array [ @@ -2490,16 +2306,6 @@ exports[`EditCoursePage renders page correctly with courseInfo, courseOptions, a }, "learner_testimonials": null, "level_type": "intermediate", - "location_restriction": Object { - "countries": Array [ - "AF", - "AX", - ], - "restriction_type": "allowlist", - "states": Array [ - "AL", - ], - }, "organization_logo_override_url": "http://image.src.small", "organization_short_code_override": "test short code", "outcome": "

learn

", @@ -2687,11 +2493,6 @@ exports[`EditCoursePage renders page correctly with courseInfo, courseOptions, a }, "learner_testimonials": undefined, "level_type": undefined, - "location_restriction": Object { - "countries": null, - "restriction_type": null, - "states": null, - }, "organization_logo_override_url": undefined, "organization_short_code_override": undefined, "outcome": undefined, @@ -2858,68 +2659,6 @@ exports[`EditCoursePage renders page correctly with courseOptions 1`] = ` }, ], }, - "location_restriction": Object { - "children": Object { - "countries": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Afghanistan", - "value": "AF", - }, - Object { - "label": "Åland Islands", - "value": "AX", - }, - Object { - "label": "Algeria", - "value": "DZ", - }, - Object { - "label": "American Samoa", - "value": "AS", - }, - Object { - "label": "Andorra", - "value": "AD", - }, - ], - }, - }, - "restriction_type": Object { - "choices": Array [ - "blocklist", - "allowlist", - ], - }, - "states": Object { - "child": Object { - "choices": Array [ - Object { - "label": "Alabama", - "value": "AL", - }, - Object { - "label": "Arizona", - "value": "AZ", - }, - Object { - "label": "Arkansas", - "value": "AR", - }, - Object { - "label": "California", - "value": "CA", - }, - Object { - "label": "Colorado", - "value": "CO", - }, - ], - }, - }, - }, - }, "subjects": Object { "child": Object { "choices": Array [ @@ -3217,11 +2956,6 @@ exports[`EditCoursePage renders page correctly with courseOptions 1`] = ` }, "learner_testimonials": undefined, "level_type": undefined, - "location_restriction": Object { - "countries": null, - "restriction_type": null, - "states": null, - }, "organization_logo_override_url": undefined, "organization_short_code_override": undefined, "outcome": undefined, @@ -3391,11 +3125,6 @@ exports[`EditCoursePage renders page correctly with courseOptions error 1`] = ` }, "learner_testimonials": undefined, "level_type": undefined, - "location_restriction": Object { - "countries": null, - "restriction_type": null, - "states": null, - }, "organization_logo_override_url": undefined, "organization_short_code_override": undefined, "outcome": undefined, @@ -3640,11 +3369,6 @@ exports[`EditCoursePage renders page correctly with courseRunOptions 1`] = ` }, "learner_testimonials": undefined, "level_type": undefined, - "location_restriction": Object { - "countries": null, - "restriction_type": null, - "states": null, - }, "organization_logo_override_url": undefined, "organization_short_code_override": undefined, "outcome": undefined, @@ -3814,11 +3538,6 @@ exports[`EditCoursePage renders page correctly with courseRunOptions error 1`] = }, "learner_testimonials": undefined, "level_type": undefined, - "location_restriction": Object { - "countries": null, - "restriction_type": null, - "states": null, - }, "organization_logo_override_url": undefined, "organization_short_code_override": undefined, "outcome": undefined, diff --git a/src/components/EditCoursePage/index.jsx b/src/components/EditCoursePage/index.jsx index 271fb4c47..542c04b0b 100644 --- a/src/components/EditCoursePage/index.jsx +++ b/src/components/EditCoursePage/index.jsx @@ -212,21 +212,6 @@ class EditCoursePage extends React.Component { }; } - formatLocationRestrictionFields(courseData) { - if (courseData?.location_restriction) { - return { - restriction_type: courseData.location_restriction.restriction_type, - countries: courseData.location_restriction.countries, - states: courseData.location_restriction.states, - }; - } - return { - restriction_type: null, - countries: null, - states: null, - }; - } - prepareSendCourseData(courseData) { const { courseInfo: { @@ -253,7 +238,6 @@ class EditCoursePage extends React.Component { key, learner_testimonials: courseData.learner_testimonials, level_type: courseData.level_type, - location_restriction: courseData.location_restriction, organization_logo_override: courseData.organization_logo_override_url, organization_short_code_override: courseData.organization_short_code_override, outcome: courseData.outcome, @@ -280,12 +264,10 @@ class EditCoursePage extends React.Component { if (courseData.course_type === EXECUTIVE_EDUCATION_SLUG) { formattedCourseData.additional_metadata = this.formatAdditionalMetadataFields(courseData); } - // Check for values to prevent a new entry being created unnecessarily if (courseData.in_year_value && Object.values(courseData.in_year_value).some(value => value !== null)) { formattedCourseData.in_year_value = this.formatValueFields(courseData); } - return formattedCourseData; } @@ -462,10 +444,6 @@ class EditCoursePage extends React.Component { return this.formatValueFields(this.props.courseInfo.data); } - buildLocationRestriction() { - return this.formatLocationRestrictionFields(this.props.courseInfo.data); - } - buildInitialValues() { const { courseInfo: { @@ -531,7 +509,6 @@ class EditCoursePage extends React.Component { enterprise_subscription_inclusion, organization_short_code_override, organization_logo_override_url, - location_restriction: this.buildLocationRestriction(), in_year_value: this.buildInYearValue(), }; } diff --git a/src/components/RenderSelectField/updated-paragon-component.jsx b/src/components/RenderSelectField/updated-paragon-component.jsx deleted file mode 100644 index 5e690a2e3..000000000 --- a/src/components/RenderSelectField/updated-paragon-component.jsx +++ /dev/null @@ -1,71 +0,0 @@ -// TODO: This file can be deleted as a part of https://github.com/openedx/frontend-app-publisher/pull/761 -// When we migrate off deprecated paragon components, we want to replace the contents of ./index.jsx -// with the contents of this file and then delete this file. -// Adding this file to the codebase as a temporary measure -// because the existing select component doesn't have multiselect functionality -// and it doesn't make sense to edit paragon to add that functionality bc we're moving off that component soon. - -import React from 'react'; -import PropTypes from 'prop-types'; -import { Form } from '@edx/paragon'; - -const RenderSelectField = ({ - input, - extraInput, - name, - label, - disabled, - required, - meta: { touched, error }, - options, -}) => ( - - - {label} - - - {options.map(option => ( - - ))} - {touched && error && ( - - {error} - - )} - - -); - -RenderSelectField.defaultProps = { - extraInput: {}, - name: '', - disabled: false, - required: false, -}; - -RenderSelectField.propTypes = { - input: PropTypes.shape({}).isRequired, - extraInput: PropTypes.shape({}), - name: PropTypes.string, - label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired, - meta: PropTypes.shape({ - touched: PropTypes.bool, - error: PropTypes.string, - }).isRequired, - disabled: PropTypes.bool, - required: PropTypes.bool, - options: PropTypes.oneOfType([ - PropTypes.arrayOf(PropTypes.string), - PropTypes.arrayOf(PropTypes.object), - ]).isRequired, -}; - -export default RenderSelectField; diff --git a/src/data/constants/testData.js b/src/data/constants/testData.js index 3d2b6118e..2d80490b7 100644 --- a/src/data/constants/testData.js +++ b/src/data/constants/testData.js @@ -225,38 +225,6 @@ const courseOptions = { ], }, }, - location_restriction: { - children: { - restriction_type: { - choices: [ - 'blocklist', - 'allowlist', - ], - }, - countries: { - child: { - choices: [ - { label: 'Afghanistan', value: 'AF' }, - { label: 'Åland Islands', value: 'AX' }, - { label: 'Algeria', value: 'DZ' }, - { label: 'American Samoa', value: 'AS' }, - { label: 'Andorra', value: 'AD' }, - ], - }, - }, - states: { - child: { - choices: [ - { label: 'Alabama', value: 'AL' }, - { label: 'Arizona', value: 'AZ' }, - { label: 'Arkansas', value: 'AR' }, - { label: 'California', value: 'CA' }, - { label: 'Colorado', value: 'CO' }, - ], - }, - }, - }, - }, }, }, },