Skip to content

Commit

Permalink
fix(e2e): fix cleeng test (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLantukh authored Dec 5, 2023
1 parent 230c59b commit 65ea840
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions test-e2e/tests/payments/coupons_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function runTestSuite(props: ProviderProps, providerName: string) {
);
}

await finishAndCheckSubscription(I, addYear(today), today, props.yearlyOffer.couponNextPayment, props.hasInlineOfferSwitch);
await finishAndCheckSubscription(I, addYear(today), today, props.yearlyOffer.price, props.hasInlineOfferSwitch);
});

Scenario(`I can cancel a free subscription - ${providerName}`, async ({ I }) => {
Expand All @@ -96,7 +96,7 @@ function runTestSuite(props: ProviderProps, providerName: string) {

Scenario(`I can renew a free subscription - ${providerName}`, async ({ I }) => {
if (props.canRenewSubscription) {
renewPlan(I, addYear(today), props.yearlyOffer.couponNextPayment);
renewPlan(I, addYear(today), props.yearlyOffer.price);
} else {
I.say(`Provider ${providerName} does not support renewal. Skipping test...`);
}
Expand Down
6 changes: 0 additions & 6 deletions test-e2e/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,23 @@ export default {
label: `label[for="S970187168_NL"]`,
price: formatPrice(6.99, 'EUR', 'NL'),
paymentFee: formatPrice(0, 'EUR', 'NL'),
// Cleeng considers next payment price to be 0 in case 100% coupon is applied
couponNextPayment: formatPrice(0, 'EUR', 'NL'),
},
inplayer: {
label: `label[for="S38279"]`,
price: formatPrice(6.99, 'EUR'),
paymentFee: formatPrice(0, 'EUR'),
couponNextPayment: formatPrice(50, 'EUR'),
},
},
yearlyOffer: {
cleeng: {
label: `label[for="S467691538_NL"]`,
price: formatPrice(50, 'EUR', 'NL'),
paymentFee: formatPrice(0, 'EUR', 'NL'),
// Cleeng considers next payment price to be 0 in case 100% coupon is applied
couponNextPayment: formatPrice(0, 'EUR', 'NL'),
},
inplayer: {
label: `label[for="S38280"]`,
price: formatPrice(50, 'EUR'),
paymentFee: formatPrice(0, 'EUR'),
couponNextPayment: formatPrice(50, 'EUR'),
},
},
},
Expand Down
1 change: 0 additions & 1 deletion test/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export interface TestConfig {
export type PaymentOffer = {
label: string;
price: string;
couponNextPayment: string;
paymentFee: string;
};

Expand Down

0 comments on commit 65ea840

Please sign in to comment.