Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment security design test - remove variants 1 and 3 #2211

Merged
merged 1 commit into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions support-frontend/assets/helpers/abTests/abtestDefinitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
// ----- Tests ----- //
export type LandingPageCopyReturningSinglesTestVariants = 'control' | 'returningSingle' | 'notintest';
export type LandingPageStripeElementsRecurringTestVariants = 'control' | 'stripeElements' | 'notintest';
export type PaymentSecurityDesignTestVariants = 'control' | 'V1_securetop' | 'V2_securemiddle' | 'V3_securebottom' | 'V4_grey' | 'notintest'
export type RecurringStripePaymentRequestButtonTestVariants = 'contro' | 'paymentRequestButton' | 'notintest';
export type PaymentSecurityDesignTestVariants = 'control' | 'V2_securemiddle' | 'V4_grey' | 'notintest';

const contributionsLandingPageMatch = '/(uk|us|eu|au|ca|nz|int)/contribute(/.*)?$';

Expand Down Expand Up @@ -89,15 +89,9 @@ export const tests: Tests = {
{
id: 'control',
},
{
id: 'V1_securetop',
},
{
id: 'V2_securemiddle',
},
{
id: 'V3_securebottom',
},
{
id: 'V4_grey',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ 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 SecureTransactionIndicator from 'components/secureTransactionIndicator/secureTransactionIndicator';
import type { PaymentSecurityDesignTestVariants, RecurringStripePaymentRequestButtonTestVariants } from 'helpers/abTests/abtestDefinitions';


// ----- Types ----- //
/* eslint-disable react/no-unused-prop-types */
type PropTypes = {|
Expand Down Expand Up @@ -250,8 +249,6 @@ function withProps(props: PropTypes) {

const showSecureStripeContainer: boolean = props.paymentSecurityDesignTestVariant !== 'control' || props.countryGroupId === 'GBPCountries';
const showSecureButtonBg: boolean = showSecureStripeContainer && props.paymentMethod === Stripe && (props.stripeElementsRecurringTestVariant === 'stripeElements' || props.contributionType === 'ONE_OFF');
const showSecureTransactionIndicator: boolean = props.paymentSecurityDesignTestVariant === 'V3_securebottom' && props.countryGroupId !== 'GBPCountries';
const secureTransactionIndicatorClassNames: string[] = showSecureButtonBg ? ['bottom-grey'] : ['bottom-regular'];

return (
<form onSubmit={onSubmit(props)} className={classNameWithModifiers(baseClass, classModifiers)} noValidate>
Expand Down Expand Up @@ -294,9 +291,6 @@ function withProps(props: PropTypes) {
onPaymentAuthorisation={props.onPaymentAuthorisation}
showSecureBackground={showSecureButtonBg}
/>
{showSecureTransactionIndicator &&
<SecureTransactionIndicator modifierClasses={secureTransactionIndicatorClassNames} />
}
</div>

<TermsPrivacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ const cssModifiers = campaignName && campaigns[campaignName] && campaigns[campai
const backgroundImageSrc = campaignName && campaigns[campaignName] && campaigns[campaignName].backgroundImage ?
campaigns[campaignName].backgroundImage : null;

const showSecureTransactionIndicator = store.getState().common.abParticipations.paymentSecurityDesignTest === 'V1_securetop'
|| countryGroupId === 'GBPCountries' ? <SecureTransactionIndicator modifierClasses={['top']} /> : null;
const showSecureTransactionIndicator = countryGroupId === 'GBPCountries' ? <SecureTransactionIndicator modifierClasses={['top']} /> : null;

function contributionsLandingPage(campaignCodeParameter: ?string) {
return (
Expand Down