feat: [VAN-655] User's year of birth field behind the feature flag (#449)
This commit is contained in:
@@ -30,3 +30,4 @@ WELCOME_PAGE_SUPPORT_LINK='http://localhost:1999/welcome'
|
||||
INFO_EMAIL='info@edx.org'
|
||||
DISABLE_ENTERPRISE_LOGIN=''
|
||||
REGISTER_CONVERSION_COOKIE_NAME='openedx-user-register-conversion'
|
||||
COLLECT_YEAR_OF_BIRTH='true'
|
||||
|
||||
@@ -170,19 +170,22 @@ const WelcomePage = (props) => {
|
||||
{getOptions('levelOfEducation')}
|
||||
</Form.Control>
|
||||
</Form.Group>
|
||||
<Form.Group controlId="yearOfBirth">
|
||||
<Form.Control
|
||||
as="select"
|
||||
name="yearOfBirth"
|
||||
value={values.yearOfBirth}
|
||||
onChange={(e) => onChangeHandler(e)}
|
||||
trailingElement={<Icon src={ExpandMore} />}
|
||||
floatingLabel={intl.formatMessage(messages['year.of.birth.label'])}
|
||||
>
|
||||
<option value="">{intl.formatMessage(messages['year.of.birth.label'])}</option>
|
||||
{getOptions('yearOfBirth')}
|
||||
</Form.Control>
|
||||
</Form.Group>
|
||||
{(getConfig().COLLECT_YEAR_OF_BIRTH === 'true')
|
||||
&& (
|
||||
<Form.Group controlId="yearOfBirth">
|
||||
<Form.Control
|
||||
as="select"
|
||||
name="yearOfBirth"
|
||||
value={values.yearOfBirth}
|
||||
onChange={(e) => onChangeHandler(e)}
|
||||
trailingElement={<Icon src={ExpandMore} />}
|
||||
floatingLabel={intl.formatMessage(messages['year.of.birth.label'])}
|
||||
>
|
||||
<option value="">{intl.formatMessage(messages['year.of.birth.label'])}</option>
|
||||
{getOptions('yearOfBirth')}
|
||||
</Form.Control>
|
||||
</Form.Group>
|
||||
)}
|
||||
<Form.Group controlId="gender" className="mb-3">
|
||||
<Form.Control
|
||||
as="select"
|
||||
|
||||
@@ -77,7 +77,9 @@ describe('WelcomePageTests', () => {
|
||||
level_of_education: 'other',
|
||||
gender: 'm',
|
||||
};
|
||||
|
||||
mergeConfig({
|
||||
COLLECT_YEAR_OF_BIRTH: 'true',
|
||||
});
|
||||
store.dispatch = jest.fn(store.dispatch);
|
||||
const welcomePage = await getWelcomePage();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user