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

fix(e2e): fix cleeng tests #414

Merged
merged 1 commit into from
Dec 5, 2023
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
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