Skip to content

Commit

Permalink
Merge pull request #1372 from guardian/ticket-tailor-copy-changes
Browse files Browse the repository at this point in the history
Ticket tailor copy changes
  • Loading branch information
johnduffell authored Aug 29, 2024
2 parents 84376a0 + fd2d5eb commit 4a1e848
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
guardianWeeklyPaidByCard,
membershipSupporter,
newspaperVoucherPaidByPaypal,
patronMembership,
supporterPlus,
supporterPlusAnnualCancelled,
supporterPlusCancelled,
Expand Down Expand Up @@ -90,6 +91,7 @@ export const WithSubscriptions: StoryObj<typeof AccountOverview> = {
digitalPackPaidByDirectDebit(),
newspaperVoucherPaidByPaypal(),
membershipSupporter(),
patronMembership(),
supporterPlus(),
tierThree(),
),
Expand Down
2 changes: 1 addition & 1 deletion client/components/mma/accountoverview/ProductCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ export const ProductCard = ({
<Card.Section>
<div>
<h4 css={sectionHeadingCss}>
Guardian Live - Eventbrite discount codes
Guardian Live - Ticket Tailor promo codes
</h4>
<div>
<dl css={keyValueCss}>
Expand Down
15 changes: 15 additions & 0 deletions client/fixtures/productBuilder/productBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,21 @@ export class ProductBuilder {
return this;
}

asPatronTier() {
this.productToBuild.tier = 'Patron';
return this;
}

withEvents() {
const currentPlans = this.productToBuild.subscription.currentPlans;
for (const currentPlan of currentPlans) {
if (isPaidSubscriptionPlan(currentPlan)) {
currentPlan.features = 'Fancy Events';
}
}
return this;
}

nonServiceableCountry() {
this.productToBuild.billingCountry = 'New Caledonia';
return this;
Expand Down
10 changes: 10 additions & 0 deletions client/fixtures/productBuilder/testProducts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,13 @@ export function patronDigitalPack() {
.asPatron()
.getProductDetailObject();
}

export function patronMembership() {
return new ProductBuilder(baseMembership())
.payByCard()
.withPrice(10000)
.asPatron()
.asPatronTier()
.withEvents()
.getProductDetailObject();
}

0 comments on commit 4a1e848

Please sign in to comment.