From 06b30ecd9b7f983164e9082559aef456aadf0df0 Mon Sep 17 00:00:00 2001 From: TJ Silver Date: Tue, 19 Nov 2019 11:30:53 +0000 Subject: [PATCH] give test more meaningful name --- .../assets/helpers/abTests/abtestDefinitions.js | 6 +++--- .../contributions-landing/components/ContributionForm.jsx | 8 ++++---- .../components/PaymentMethodSelector.jsx | 8 ++++---- .../pages/contributions-landing/contributionsLanding.jsx | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/support-frontend/assets/helpers/abTests/abtestDefinitions.js b/support-frontend/assets/helpers/abTests/abtestDefinitions.js index 1c0ad3cb994..9c938013b3a 100644 --- a/support-frontend/assets/helpers/abTests/abtestDefinitions.js +++ b/support-frontend/assets/helpers/abTests/abtestDefinitions.js @@ -10,7 +10,7 @@ import { export type LandingPageCopyReturningSinglesTestVariants = 'control' | 'returningSingle' | 'notintest'; export type LandingPageStripeElementsRecurringTestVariants = 'control' | 'stripeElements' | 'notintest'; export type RecurringStripePaymentRequestButtonTestVariants = 'control' | 'paymentRequestButton' | 'notintest'; -export type PaymentSecurityDesignTest1BVariants = 'control' | 'V1_securemiddlegrey' | 'notintest'; +export type paymentSecuritySecureTransactionGreyNonUKVariants = 'control' | 'V1_securetransactiongrey' | 'notintest'; const contributionsLandingPageMatch = '/(uk|us|eu|au|ca|nz|int)/contribute(/.*)?$'; @@ -83,14 +83,14 @@ export const tests: Tests = { targetPage: contributionsLandingPageMatch, }, - paymentSecurityDesignTest1B: { + paymentSecuritySecureTransactionGreyNonUK: { type: 'OTHER', variants: [ { id: 'control', }, { - id: 'V1_securemiddlegrey', + id: 'V1_securetransactiongrey', }, ], audiences: { diff --git a/support-frontend/assets/pages/contributions-landing/components/ContributionForm.jsx b/support-frontend/assets/pages/contributions-landing/components/ContributionForm.jsx index 588541fb9d8..fda94f7e9a2 100644 --- a/support-frontend/assets/pages/contributions-landing/components/ContributionForm.jsx +++ b/support-frontend/assets/pages/contributions-landing/components/ContributionForm.jsx @@ -52,7 +52,7 @@ import type { PaymentMethod } from 'helpers/paymentMethods'; import { DirectDebit, Stripe, ExistingCard, ExistingDirectDebit } from 'helpers/paymentMethods'; import { getCampaignName } from 'helpers/campaigns'; import type { LandingPageStripeElementsRecurringTestVariants } from 'helpers/abTests/abtestDefinitions'; -import type { PaymentSecurityDesignTest1BVariants, RecurringStripePaymentRequestButtonTestVariants } from 'helpers/abTests/abtestDefinitions'; +import type { paymentSecuritySecureTransactionGreyNonUKVariants, RecurringStripePaymentRequestButtonTestVariants } from 'helpers/abTests/abtestDefinitions'; // ----- Types ----- // @@ -85,7 +85,7 @@ type PropTypes = {| country: IsoCountry, createStripePaymentMethod: () => void, stripeElementsRecurringTestVariant: LandingPageStripeElementsRecurringTestVariants, - paymentSecurityDesignTest1BVariant: PaymentSecurityDesignTest1BVariants, + paymentSecuritySecureTransactionGreyNonUKVariant: paymentSecuritySecureTransactionGreyNonUKVariants, recurringStripePaymentRequestButtonTestVariant: RecurringStripePaymentRequestButtonTestVariants, |}; @@ -118,7 +118,7 @@ const mapStateToProps = (state: State) => ({ country: state.common.internationalisation.countryId, stripeV3HasLoaded: state.page.form.stripeV3HasLoaded, stripeElementsRecurringTestVariant: state.common.abParticipations.stripeElementsRecurring, - paymentSecurityDesignTest1BVariant: state.common.abParticipations.paymentSecurityDesignTest1B, + paymentSecuritySecureTransactionGreyNonUKVariant: state.common.abParticipations.paymentSecuritySecureTransactionGreyNonUK, recurringStripePaymentRequestButtonTestVariant: state.common.abParticipations.recurringStripePaymentRequestButton, }); @@ -247,7 +247,7 @@ function withProps(props: PropTypes) { const classModifiers = ['contribution', 'with-labels']; - const showSecureStripeContainer: boolean = props.paymentSecurityDesignTest1BVariant !== 'control' || props.countryGroupId === 'GBPCountries'; + const showSecureStripeContainer: boolean = props.paymentSecuritySecureTransactionGreyNonUKVariant !== 'control' || props.countryGroupId === 'GBPCountries'; const showSecureButtonBg: boolean = showSecureStripeContainer && props.paymentMethod === Stripe && (props.stripeElementsRecurringTestVariant === 'stripeElements' || props.contributionType === 'ONE_OFF'); return ( diff --git a/support-frontend/assets/pages/contributions-landing/components/PaymentMethodSelector.jsx b/support-frontend/assets/pages/contributions-landing/components/PaymentMethodSelector.jsx index c10bd770415..5ac3ae15d33 100644 --- a/support-frontend/assets/pages/contributions-landing/components/PaymentMethodSelector.jsx +++ b/support-frontend/assets/pages/contributions-landing/components/PaymentMethodSelector.jsx @@ -41,7 +41,7 @@ import { subscriptionToExplainerPart, } from '../../../helpers/existingPaymentMethods/existingPaymentMethods'; import SecureTransactionIndicator from 'components/secureTransactionIndicator/secureTransactionIndicator'; -import type { PaymentSecurityDesignTest1BVariants } from 'helpers/abTests/abtestDefinitions'; +import type { paymentSecuritySecureTransactionGreyNonUKVariants } from 'helpers/abTests/abtestDefinitions'; import { type CountryGroupId, detect, @@ -62,7 +62,7 @@ type PropTypes = {| updateSelectedExistingPaymentMethod: (RecentlySignedInExistingPaymentMethod | typeof undefined) => Action, isTestUser: boolean, switches: Switches, - paymentSecurityDesignTest1BVariant: PaymentSecurityDesignTest1BVariants, + paymentSecuritySecureTransactionGreyNonUKVariant: paymentSecuritySecureTransactionGreyNonUKVariants, |}; /* eslint-enable react/no-unused-prop-types */ @@ -75,7 +75,7 @@ const mapStateToProps = (state: State) => ({ existingPaymentMethod: state.page.form.existingPaymentMethod, isTestUser: state.page.user.isTestUser || false, switches: state.common.settings.switches, - paymentSecurityDesignTest1BVariant: state.common.abParticipations.paymentSecurityDesignTest1B, + paymentSecuritySecureTransactionGreyNonUKVariant: state.common.abParticipations.paymentSecuritySecureTransactionGreyNonUK, }); const mapDispatchToProps = { @@ -121,7 +121,7 @@ function withProps(props: PropTypes) {

Payment method

); - const legend = props.paymentSecurityDesignTest1BVariant === 'V1_securemiddlegrey' && countryGroupId !== 'GBPCountries' ? + const legend = props.paymentSecuritySecureTransactionGreyNonUKVariant === 'V1_securetransactiongrey' && countryGroupId !== 'GBPCountries' ? (
{legendSimple} diff --git a/support-frontend/assets/pages/contributions-landing/contributionsLanding.jsx b/support-frontend/assets/pages/contributions-landing/contributionsLanding.jsx index 0967b4fe9d8..dc895018fe2 100644 --- a/support-frontend/assets/pages/contributions-landing/contributionsLanding.jsx +++ b/support-frontend/assets/pages/contributions-landing/contributionsLanding.jsx @@ -96,7 +96,7 @@ const backgroundImageSrc = campaignName && campaigns[campaignName] && campaigns[ const showSecureTransactionIndicator = () => { if (countryGroupId === 'GBPCountries') { return ; - } else if (store.getState().common.abParticipations.paymentSecurityDesignTest1B === 'V1_securemiddlegrey') { + } else if (store.getState().common.abParticipations.paymentSecuritySecureTransactionGreyNonUK === 'V1_securetransactiongrey') { return ; } return null;