Skip to content

Commit

Permalink
Merge branch 'develop' into PS-290-new-payment-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
kiremitrov123 authored Sep 26, 2024
2 parents 0f0ab49 + 5231d86 commit aa4d71e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions platforms/web/test-e2e/tests/offers/choose_offer_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const jwProps: ProviderProps = {
fieldWrapper: '',
hasInlineOfferSwitch: true,
};

const cleengProps: ProviderProps = {
config: testConfigs.svod,
monthlyOffer: constants.offers.monthlyOffer.cleeng,
Expand Down
8 changes: 4 additions & 4 deletions platforms/web/test-e2e/tests/payments/payments_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const jwProps: ProviderProps = {
canRenewSubscription: false,
fieldWrapper: '',
hasInlineOfferSwitch: true,
cardInfo: Array.of(['Card number', '•••• •••• •••• 1111'], ['Expiry date', '03/2030'], ['Security code', '******']),
};

const cleengProps: ProviderProps = {
Expand All @@ -27,6 +28,7 @@ const cleengProps: ProviderProps = {
canRenewSubscription: true,
fieldWrapper: 'iframe',
hasInlineOfferSwitch: false,
cardInfo: Array.of(['Card number', '•••• •••• •••• 1115'], ['Expiry date', '03/2030'], ['Security code', '******']),
};

runTestSuite(jwProps, 'JW Player', true);
Expand All @@ -37,8 +39,6 @@ function runTestSuite(props: ProviderProps, providerName: string, isAccessBridge

const today = new Date();

const cardInfo = Array.of(['Card number', '•••• •••• •••• 1111'], ['Expiry date', '03/2030'], ['Security code', '******']);

Feature(`payments - ${providerName}`).retry(Number(process.env.TEST_RETRY_COUNT) || 0);

Before(async ({ I }) => {
Expand Down Expand Up @@ -92,7 +92,7 @@ function runTestSuite(props: ProviderProps, providerName: string, isAccessBridge

await checkSubscription(I, addYear(today), today, props.yearlyOffer.price, props.hasInlineOfferSwitch);

cardInfo.forEach(([label, value]) => I.seeInField(label, value));
props.cardInfo?.forEach(([label, value]) => I.seeInField(label, value));
});

Scenario(`I can cancel my subscription - ${providerName}`, async ({ I }) => {
Expand All @@ -105,7 +105,7 @@ function runTestSuite(props: ProviderProps, providerName: string, isAccessBridge
await cancelPlan(I, addYear(today), props.canRenewSubscription, providerName);

// Still see payment info
cardInfo.forEach(([label, value]) => I.seeInField(label, value));
props.cardInfo?.forEach(([label, value]) => I.seeInField(label, value));
});

Scenario(`I can renew my subscription - ${providerName}`, async ({ I }) => {
Expand Down
1 change: 1 addition & 0 deletions platforms/web/test/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ export type ProviderProps = {
locale?: string | undefined;
fieldWrapper?: string;
hasInlineOfferSwitch: boolean;
cardInfo?: string[][];
};

0 comments on commit aa4d71e

Please sign in to comment.