From fb7fd8b24dcbf2fdfeb04c6d6efbda48c2e0f9e9 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 6 Feb 2020 16:34:47 -0500 Subject: [PATCH 1/6] Opt-in to emails by default on account creation in panel and hub. Remove checkboxes --- _locales/en/messages.json | 3 --- app/Account/AccountActions.js | 14 +++++++------- app/Account/AccountConstants.js | 6 +++--- .../Views/CreateAccountView/CreateAccountView.jsx | 14 -------------- .../CreateAccountViewContainer.jsx | 15 +-------------- app/hub/Views/CreateAccountView/index.js | 4 ++-- app/panel/components/CreateAccount.jsx | 15 +++------------ app/panel/containers/CreateAccountContainer.js | 4 ++-- app/scss/partials/_account.scss | 2 +- src/background.js | 3 +-- src/classes/Account.js | 6 +++--- 11 files changed, 23 insertions(+), 63 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d74c8ed74..269e14231 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1646,9 +1646,6 @@ "hub_create_account_label_password_invalid_length": { "message": "Use between 8 and 50 characters." }, - "hub_create_account_checkbox_promotions": { - "message": "Send me Ghostery updates & promotions." - }, "hub_create_account_already_have_account": { "message": "Already have a Ghostery Account?" }, diff --git a/app/Account/AccountActions.js b/app/Account/AccountActions.js index 3d29fcbf9..9977dbfef 100644 --- a/app/Account/AccountActions.js +++ b/app/Account/AccountActions.js @@ -26,8 +26,8 @@ import { GET_USER_FAIL, GET_USER_SETTINGS_SUCCESS, GET_USER_SETTINGS_FAIL, - UPDATE_PROMOTIOS_FAIL, - UPDATE_PROMOTIOS_SUCCESS, + OPT_INTO_PROMOTIONS_FAIL, + OPT_INTO_PROMOTIONS_SUCCESS, GET_USER_SUBSCRIPTION_DATA_FAIL, GET_USER_SUBSCRIPTION_DATA_SUCCESS } from './AccountConstants'; @@ -192,22 +192,22 @@ export const resetPassword = email => dispatch => ( }) ); -export const updateAccountPromotions = promotions => dispatch => ( - sendMessageInPromise('account.promotions', { promotions }).then((res) => { +export const optIntoPromotions = () => dispatch => ( + sendMessageInPromise('account.promotions').then((res) => { const { errors } = res; if (errors) { dispatch({ - type: UPDATE_PROMOTIOS_FAIL, + type: OPT_INTO_PROMOTIONS_FAIL, payload: { errors }, }); return false; } - dispatch({ type: UPDATE_PROMOTIOS_SUCCESS }); + dispatch({ type: OPT_INTO_PROMOTIONS_SUCCESS }); return true; }).catch((err) => { const errors = [{ title: err.toString(), detail: err.toString() }]; dispatch({ - type: UPDATE_PROMOTIOS_FAIL, + type: OPT_INTO_PROMOTIONS_FAIL, payload: { errors, }, diff --git a/app/Account/AccountConstants.js b/app/Account/AccountConstants.js index cfbf75683..18e613d78 100644 --- a/app/Account/AccountConstants.js +++ b/app/Account/AccountConstants.js @@ -33,9 +33,9 @@ export const GET_USER_FAIL = 'GET_USER_FAIL'; export const GET_USER_SETTINGS_SUCCESS = 'GET_USER_SETTINGS_SUCCESS'; export const GET_USER_SETTINGS_FAIL = 'GET_USER_SETTINGS_FAIL'; -// Update Promotions -export const UPDATE_PROMOTIOS_FAIL = 'UPDATE_PROMOTIOS_FAIL'; -export const UPDATE_PROMOTIOS_SUCCESS = 'UPDATE_PROMOTIOS_SUCCESS'; +// Opt into Promotions +export const OPT_INTO_PROMOTIONS_FAIL = 'OPT_INTO_PROMOTIONS_FAIL'; +export const OPT_INTO_PROMOTIONS_SUCCESS = 'OPT_INTO_PROMOTIONS_SUCCESS'; // Update Subscription Data export const GET_USER_SUBSCRIPTION_DATA_FAIL = 'GET_USER_SUBSCRIPTION_DATA_FAIL'; diff --git a/app/hub/Views/CreateAccountView/CreateAccountView.jsx b/app/hub/Views/CreateAccountView/CreateAccountView.jsx index 9bd342680..af0667bde 100644 --- a/app/hub/Views/CreateAccountView/CreateAccountView.jsx +++ b/app/hub/Views/CreateAccountView/CreateAccountView.jsx @@ -35,10 +35,8 @@ const CreateAccountView = (props) => { passwordLengthError, legalConsentChecked, legalConsentNotCheckedError, - promotionsChecked, handleInputChange, handleLegalConsentCheckboxChange, - handlePromotionsCheckboxChange, handleSubmit, } = props; @@ -183,16 +181,6 @@ const CreateAccountView = (props) => { dangerouslySetInnerHTML={{ __html: t('create_account_form_legal_consent_checkbox_label') }} /> -
- - - {t('hub_create_account_checkbox_promotions')} - -
@@ -235,10 +223,8 @@ CreateAccountView.propTypes = { password: PropTypes.string.isRequired, passwordInvalidError: PropTypes.bool.isRequired, passwordLengthError: PropTypes.bool.isRequired, - promotionsChecked: PropTypes.bool.isRequired, handleInputChange: PropTypes.func.isRequired, handleLegalConsentCheckboxChange: PropTypes.func.isRequired, - handlePromotionsCheckboxChange: PropTypes.func.isRequired, handleSubmit: PropTypes.func.isRequired, }; diff --git a/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx b/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx index 746521716..eb5fd2188 100644 --- a/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx +++ b/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx @@ -42,7 +42,6 @@ class CreateAccountViewContainer extends Component { password: '', passwordInvalidError: false, passwordLengthError: false, - promotionsChecked: false, validateInput: false, }; @@ -101,13 +100,6 @@ class CreateAccountViewContainer extends Component { this.setState(prevState => ({ legalConsentChecked: !prevState.legalConsentChecked })); } - /** - * Update promotions checkbox value by updating state - */ - _handlePromotionsCheckboxChange = () => { - this.setState(prevState => ({ promotionsChecked: !prevState.promotionsChecked })); - } - /** * Handle creating an account, but validate the data first. * @param {Object} event the 'submit' event @@ -121,7 +113,6 @@ class CreateAccountViewContainer extends Component { lastName, legalConsentChecked, password, - promotionsChecked } = this.state; const emailIsValid = email && validateEmail(email); const confirmIsValid = confirmEmail && validateConfirmEmail(email, confirmEmail); @@ -147,7 +138,7 @@ class CreateAccountViewContainer extends Component { }); this.props.actions.register(email, confirmEmail, firstName, lastName, password).then((success) => { if (success) { - this.props.actions.updateAccountPromotions(promotionsChecked); + this.props.actions.optIntoPromotions(); this.props.actions.getUser(); this.props.actions.setToast({ toastMessage: t('hub_create_account_toast_success'), @@ -181,7 +172,6 @@ class CreateAccountViewContainer extends Component { password, passwordInvalidError, passwordLengthError, - promotionsChecked, } = this.state; const createAccountChildProps = { email, @@ -195,10 +185,8 @@ class CreateAccountViewContainer extends Component { password, passwordInvalidError, passwordLengthError, - promotionsChecked, handleInputChange: this._handleInputChange, handleLegalConsentCheckboxChange: this._handleLegalConsentCheckboxChange, - handlePromotionsCheckboxChange: this._handlePromotionsCheckboxChange, handleSubmit: this._handleCreateAccountAttempt }; const signedInChildProps = { @@ -219,7 +207,6 @@ CreateAccountViewContainer.propTypes = { setToast: PropTypes.func.isRequired, register: PropTypes.func.isRequired, getUser: PropTypes.func.isRequired, - updateAccountPromotions: PropTypes.func.isRequired, }).isRequired, }; diff --git a/app/hub/Views/CreateAccountView/index.js b/app/hub/Views/CreateAccountView/index.js index ea59bbb1c..0049cd6f0 100644 --- a/app/hub/Views/CreateAccountView/index.js +++ b/app/hub/Views/CreateAccountView/index.js @@ -15,7 +15,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import CreateAccountViewContainer from './CreateAccountViewContainer'; -import { register, getUser, updateAccountPromotions } from '../../../Account/AccountActions'; +import { register, getUser, optIntoPromotions } from '../../../Account/AccountActions'; import { setToast } from '../AppView/AppViewActions'; /** @@ -37,7 +37,7 @@ const mapDispatchToProps = dispatch => ({ setToast, register, getUser, - updateAccountPromotions, + optIntoPromotions, }), dispatch), }); diff --git a/app/panel/components/CreateAccount.jsx b/app/panel/components/CreateAccount.jsx index 8c615c5f5..929d37035 100644 --- a/app/panel/components/CreateAccount.jsx +++ b/app/panel/components/CreateAccount.jsx @@ -36,7 +36,6 @@ class CreateAccount extends React.Component { legalConsentChecked: false, legalConsentNotCheckedError: false, password: '', - promotionsChecked: false, loading: false, passwordInvalidError: false, passwordLengthError: false, @@ -70,7 +69,7 @@ class CreateAccount extends React.Component { e.preventDefault(); this.setState({ loading: true }, () => { const { - email, confirmEmail, firstName, lastName, legalConsentChecked, password, promotionsChecked + email, confirmEmail, firstName, lastName, legalConsentChecked, password, } = this.state; this.setState({ loading: true }, () => { if (!validateEmail(email)) { @@ -119,7 +118,7 @@ class CreateAccount extends React.Component { this.props.actions.register(email, confirmEmail, firstName, lastName, password).then((success) => { this.setState({ loading: false }); if (success) { - this.props.actions.updateAccountPromotions(promotionsChecked); + this.props.actions.optIntoPromotions(); new RSVP.Promise((resolve) => { this.props.actions.getUser() .then(() => resolve()) @@ -140,7 +139,7 @@ class CreateAccount extends React.Component { */ render() { const { - email, confirmEmail, firstName, lastName, password, promotionsChecked, legalConsentChecked, loading, emailError, confirmEmailError, legalConsentNotCheckedError, passwordInvalidError, passwordLengthError + email, confirmEmail, firstName, lastName, password, legalConsentChecked, loading, emailError, confirmEmailError, legalConsentNotCheckedError, passwordInvalidError, passwordLengthError } = this.state; const buttonClasses = ClassNames('button ghostery-button', { loading }); return ( @@ -222,14 +221,6 @@ class CreateAccount extends React.Component {
-
-
-
- - -
-
-
diff --git a/app/panel/containers/CreateAccountContainer.js b/app/panel/containers/CreateAccountContainer.js index d32729a0a..57a91753e 100644 --- a/app/panel/containers/CreateAccountContainer.js +++ b/app/panel/containers/CreateAccountContainer.js @@ -15,7 +15,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import CreateAccount from '../components/CreateAccount'; import * as actions from '../actions/PanelActions'; // get shared actions from Panel -import { register, getUser, updateAccountPromotions } from '../../Account/AccountActions'; +import { register, getUser, optIntoPromotions } from '../../Account/AccountActions'; /** * Map redux store state properties to CreateAccount component own properties. @@ -38,7 +38,7 @@ const mapStateToProps = state => Object.assign({}, state.createAccount, { * @param {Object} ownProps CreateAccount component own props * @return {function} to be used as an argument in redux connect call */ -const mapDispatchToProps = dispatch => ({ actions: bindActionCreators(Object.assign(actions, { register, getUser, updateAccountPromotions }), dispatch) }); +const mapDispatchToProps = dispatch => ({ actions: bindActionCreators(Object.assign(actions, { register, getUser, optIntoPromotions }), dispatch) }); /** * Connects CreateAccount component to the Redux store. * @memberOf PanelContainers diff --git a/app/scss/partials/_account.scss b/app/scss/partials/_account.scss index 04b88af6a..3d4d53c4f 100644 --- a/app/scss/partials/_account.scss +++ b/app/scss/partials/_account.scss @@ -204,7 +204,7 @@ p.warning { /* CREATE ACCOUNT PANEL */ #create-account-panel { - margin-top: 10px; + margin-top: 38px; input { margin-bottom: 5px; margin-top: 5px; diff --git a/src/background.js b/src/background.js index 538e4f0c5..79423faec 100644 --- a/src/background.js +++ b/src/background.js @@ -897,8 +897,7 @@ function onMessageHandler(request, sender, callback) { return true; } if (name === 'account.promotions') { - const { promotions } = message; - account.updateEmailPreferences(promotions).then((success) => { + account.updateEmailPreferences().then((success) => { callback(success); }).catch((err) => { callback({ errors: _getJSONAPIErrorsObject(err) }); diff --git a/src/classes/Account.js b/src/classes/Account.js index f96d8d597..a3da2aa21 100644 --- a/src/classes/Account.js +++ b/src/classes/Account.js @@ -215,14 +215,14 @@ class Account { }) ) - updateEmailPreferences = set => ( + updateEmailPreferences = () => ( this._getUserID().then(userID => ( api.update('email_preferences', { type: 'email_preferences', id: userID, attributes: { - updates: set, - promotions: set, + updates: true, + promotions: true, } }) )) From dccb01efbf61dfac83c9d4a4d2a56805acf03f7a Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 6 Feb 2020 16:41:36 -0500 Subject: [PATCH 2/6] Update snapshots --- .../CreateAccountView.test.jsx.snap | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/app/hub/Views/CreateAccountView/__tests__/__snapshots__/CreateAccountView.test.jsx.snap b/app/hub/Views/CreateAccountView/__tests__/__snapshots__/CreateAccountView.test.jsx.snap index d1f69a18d..ca188b1ae 100644 --- a/app/hub/Views/CreateAccountView/__tests__/__snapshots__/CreateAccountView.test.jsx.snap +++ b/app/hub/Views/CreateAccountView/__tests__/__snapshots__/CreateAccountView.test.jsx.snap @@ -169,28 +169,6 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re onClick={[Function]} />
-
-
- - - -
- - hub_create_account_checkbox_promotions - -
-
-
- - - -
- - hub_create_account_checkbox_promotions - -
Date: Tue, 11 Feb 2020 10:57:29 -0500 Subject: [PATCH 3/6] Add function to proptypes --- app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx b/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx index eb5fd2188..074f56877 100644 --- a/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx +++ b/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx @@ -207,6 +207,7 @@ CreateAccountViewContainer.propTypes = { setToast: PropTypes.func.isRequired, register: PropTypes.func.isRequired, getUser: PropTypes.func.isRequired, + optIntoPromotions: PropTypes.func.isRequired, }).isRequired, }; From 28d6793efdb0a051493367b913b3b5dd35d69bbb Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 11 Feb 2020 13:56:08 -0500 Subject: [PATCH 4/6] Remove opt into emails entirely --- app/Account/AccountActions.js | 25 ------------------- app/Account/AccountConstants.js | 4 --- .../CreateAccountViewContainer.jsx | 2 -- app/hub/Views/CreateAccountView/index.js | 3 +-- app/panel/components/CreateAccount.jsx | 1 - .../containers/CreateAccountContainer.js | 4 +-- src/background.js | 9 ------- src/classes/Account.js | 13 ---------- 8 files changed, 3 insertions(+), 58 deletions(-) diff --git a/app/Account/AccountActions.js b/app/Account/AccountActions.js index 9977dbfef..a3851dd40 100644 --- a/app/Account/AccountActions.js +++ b/app/Account/AccountActions.js @@ -26,8 +26,6 @@ import { GET_USER_FAIL, GET_USER_SETTINGS_SUCCESS, GET_USER_SETTINGS_FAIL, - OPT_INTO_PROMOTIONS_FAIL, - OPT_INTO_PROMOTIONS_SUCCESS, GET_USER_SUBSCRIPTION_DATA_FAIL, GET_USER_SUBSCRIPTION_DATA_SUCCESS } from './AccountConstants'; @@ -191,26 +189,3 @@ export const resetPassword = email => dispatch => ( }); }) ); - -export const optIntoPromotions = () => dispatch => ( - sendMessageInPromise('account.promotions').then((res) => { - const { errors } = res; - if (errors) { - dispatch({ - type: OPT_INTO_PROMOTIONS_FAIL, - payload: { errors }, - }); - return false; - } - dispatch({ type: OPT_INTO_PROMOTIONS_SUCCESS }); - return true; - }).catch((err) => { - const errors = [{ title: err.toString(), detail: err.toString() }]; - dispatch({ - type: OPT_INTO_PROMOTIONS_FAIL, - payload: { - errors, - }, - }); - }) -); diff --git a/app/Account/AccountConstants.js b/app/Account/AccountConstants.js index 18e613d78..64eb24a63 100644 --- a/app/Account/AccountConstants.js +++ b/app/Account/AccountConstants.js @@ -33,10 +33,6 @@ export const GET_USER_FAIL = 'GET_USER_FAIL'; export const GET_USER_SETTINGS_SUCCESS = 'GET_USER_SETTINGS_SUCCESS'; export const GET_USER_SETTINGS_FAIL = 'GET_USER_SETTINGS_FAIL'; -// Opt into Promotions -export const OPT_INTO_PROMOTIONS_FAIL = 'OPT_INTO_PROMOTIONS_FAIL'; -export const OPT_INTO_PROMOTIONS_SUCCESS = 'OPT_INTO_PROMOTIONS_SUCCESS'; - // Update Subscription Data export const GET_USER_SUBSCRIPTION_DATA_FAIL = 'GET_USER_SUBSCRIPTION_DATA_FAIL'; export const GET_USER_SUBSCRIPTION_DATA_SUCCESS = 'GET_USER_SUBSCRIPTION_DATA_SUCCESS'; diff --git a/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx b/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx index 074f56877..f0099d3b2 100644 --- a/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx +++ b/app/hub/Views/CreateAccountView/CreateAccountViewContainer.jsx @@ -138,7 +138,6 @@ class CreateAccountViewContainer extends Component { }); this.props.actions.register(email, confirmEmail, firstName, lastName, password).then((success) => { if (success) { - this.props.actions.optIntoPromotions(); this.props.actions.getUser(); this.props.actions.setToast({ toastMessage: t('hub_create_account_toast_success'), @@ -207,7 +206,6 @@ CreateAccountViewContainer.propTypes = { setToast: PropTypes.func.isRequired, register: PropTypes.func.isRequired, getUser: PropTypes.func.isRequired, - optIntoPromotions: PropTypes.func.isRequired, }).isRequired, }; diff --git a/app/hub/Views/CreateAccountView/index.js b/app/hub/Views/CreateAccountView/index.js index 0049cd6f0..2fe88b9f9 100644 --- a/app/hub/Views/CreateAccountView/index.js +++ b/app/hub/Views/CreateAccountView/index.js @@ -15,7 +15,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import CreateAccountViewContainer from './CreateAccountViewContainer'; -import { register, getUser, optIntoPromotions } from '../../../Account/AccountActions'; +import { register, getUser } from '../../../Account/AccountActions'; import { setToast } from '../AppView/AppViewActions'; /** @@ -37,7 +37,6 @@ const mapDispatchToProps = dispatch => ({ setToast, register, getUser, - optIntoPromotions, }), dispatch), }); diff --git a/app/panel/components/CreateAccount.jsx b/app/panel/components/CreateAccount.jsx index 929d37035..7d0120504 100644 --- a/app/panel/components/CreateAccount.jsx +++ b/app/panel/components/CreateAccount.jsx @@ -118,7 +118,6 @@ class CreateAccount extends React.Component { this.props.actions.register(email, confirmEmail, firstName, lastName, password).then((success) => { this.setState({ loading: false }); if (success) { - this.props.actions.optIntoPromotions(); new RSVP.Promise((resolve) => { this.props.actions.getUser() .then(() => resolve()) diff --git a/app/panel/containers/CreateAccountContainer.js b/app/panel/containers/CreateAccountContainer.js index 57a91753e..0811d6cd7 100644 --- a/app/panel/containers/CreateAccountContainer.js +++ b/app/panel/containers/CreateAccountContainer.js @@ -15,7 +15,7 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import CreateAccount from '../components/CreateAccount'; import * as actions from '../actions/PanelActions'; // get shared actions from Panel -import { register, getUser, optIntoPromotions } from '../../Account/AccountActions'; +import { register, getUser } from '../../Account/AccountActions'; /** * Map redux store state properties to CreateAccount component own properties. @@ -38,7 +38,7 @@ const mapStateToProps = state => Object.assign({}, state.createAccount, { * @param {Object} ownProps CreateAccount component own props * @return {function} to be used as an argument in redux connect call */ -const mapDispatchToProps = dispatch => ({ actions: bindActionCreators(Object.assign(actions, { register, getUser, optIntoPromotions }), dispatch) }); +const mapDispatchToProps = dispatch => ({ actions: bindActionCreators(Object.assign(actions, { register, getUser }), dispatch) }); /** * Connects CreateAccount component to the Redux store. * @memberOf PanelContainers diff --git a/src/background.js b/src/background.js index 79423faec..29eda52ed 100644 --- a/src/background.js +++ b/src/background.js @@ -896,15 +896,6 @@ function onMessageHandler(request, sender, callback) { }); return true; } - if (name === 'account.promotions') { - account.updateEmailPreferences().then((success) => { - callback(success); - }).catch((err) => { - callback({ errors: _getJSONAPIErrorsObject(err) }); - log('UPDATE PROMOTIONS FAIL', err); - }); - return true; - } if (name === 'update_database') { checkLibraryVersion().then((result) => { callback(result); diff --git a/src/classes/Account.js b/src/classes/Account.js index a3da2aa21..61a427d7d 100644 --- a/src/classes/Account.js +++ b/src/classes/Account.js @@ -215,19 +215,6 @@ class Account { }) ) - updateEmailPreferences = () => ( - this._getUserID().then(userID => ( - api.update('email_preferences', { - type: 'email_preferences', - id: userID, - attributes: { - updates: true, - promotions: true, - } - }) - )) - ) - sendValidateAccountEmail = () => ( this._getUserID() .then(userID => fetch(`${AUTH_SERVER}/api/v2/send_email/validate_account/${userID}`)) From 088ca8c41683b633e610bca622425a86434d525b Mon Sep 17 00:00:00 2001 From: Ethan Gooding Date: Tue, 11 Feb 2020 16:30:15 -0500 Subject: [PATCH 5/6] Update styling after removing checkbox; approved by design team --- app/scss/partials/_account.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scss/partials/_account.scss b/app/scss/partials/_account.scss index 3d4d53c4f..fb0072583 100644 --- a/app/scss/partials/_account.scss +++ b/app/scss/partials/_account.scss @@ -204,7 +204,7 @@ p.warning { /* CREATE ACCOUNT PANEL */ #create-account-panel { - margin-top: 38px; + margin-top: 25px; input { margin-bottom: 5px; margin-top: 5px; @@ -250,7 +250,7 @@ p.warning { } } #account-creation-buttons .button { - margin-bottom: 0; + margin: 20px 0 0; width: 150px; } } From c22022443a6bfa6d13340a250e0a69ed9d27fcf2 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 13 Feb 2020 15:01:11 -0500 Subject: [PATCH 6/6] Remove promotion unit tests and scss --- .../CreateAccountView/__tests__/CreateAccountView.test.jsx | 6 ------ app/scss/partials/_account.scss | 7 ------- 2 files changed, 13 deletions(-) diff --git a/app/hub/Views/CreateAccountView/__tests__/CreateAccountView.test.jsx b/app/hub/Views/CreateAccountView/__tests__/CreateAccountView.test.jsx index e046c4725..70f6e412f 100644 --- a/app/hub/Views/CreateAccountView/__tests__/CreateAccountView.test.jsx +++ b/app/hub/Views/CreateAccountView/__tests__/CreateAccountView.test.jsx @@ -31,10 +31,8 @@ describe('app/hub/Views/CreateAccount component', () => { password: '', passwordInvalidError: false, passwordLengthError: false, - promotionsChecked: false, handleInputChange: () => {}, handleLegalConsentCheckboxChange: () => {}, - handlePromotionsCheckboxChange: () => {}, handleSubmit: () => {}, }; @@ -58,10 +56,8 @@ describe('app/hub/Views/CreateAccount component', () => { password: '', passwordInvalidError: true, passwordLengthError: true, - promotionsChecked: true, handleInputChange: () => {}, handleLegalConsentCheckboxChange: () => {}, - handlePromotionsCheckboxChange: () => {}, handleSubmit: () => {}, }; @@ -87,10 +83,8 @@ describe('app/hub/Views/CreateAccount component', () => { password: '', passwordInvalidError: false, passwordLengthError: false, - promotionsChecked: false, handleInputChange: () => {}, handleLegalConsentCheckboxChange: () => {}, - handlePromotionsCheckboxChange: () => {}, handleSubmit: jest.fn(), }; diff --git a/app/scss/partials/_account.scss b/app/scss/partials/_account.scss index 3d4d53c4f..1b148b459 100644 --- a/app/scss/partials/_account.scss +++ b/app/scss/partials/_account.scss @@ -225,13 +225,6 @@ p.warning { } } } - #create-account-promotions { - margin-bottom: 10px; - label { - font-size: 11px; - font-weight: 500; - } - } #create-account-legal-consent-checkbox { margin-bottom: 10px; label {