diff --git a/platforms/web/test-e2e/tests/offers/choose_offer_test.ts b/platforms/web/test-e2e/tests/offers/choose_offer_test.ts index 07b667cc0..beb2a9820 100644 --- a/platforms/web/test-e2e/tests/offers/choose_offer_test.ts +++ b/platforms/web/test-e2e/tests/offers/choose_offer_test.ts @@ -16,6 +16,7 @@ const jwProps: ProviderProps = { fieldWrapper: '', hasInlineOfferSwitch: true, }; + const cleengProps: ProviderProps = { config: testConfigs.svod, monthlyOffer: constants.offers.monthlyOffer.cleeng, diff --git a/platforms/web/test-e2e/tests/payments/payments_test.ts b/platforms/web/test-e2e/tests/payments/payments_test.ts index f8fdb7ec1..baa0223c3 100644 --- a/platforms/web/test-e2e/tests/payments/payments_test.ts +++ b/platforms/web/test-e2e/tests/payments/payments_test.ts @@ -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 = { @@ -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); @@ -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 }) => { @@ -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 }) => { @@ -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 }) => { diff --git a/platforms/web/test/types.ts b/platforms/web/test/types.ts index 5eb66a16f..0b14f09c6 100644 --- a/platforms/web/test/types.ts +++ b/platforms/web/test/types.ts @@ -26,4 +26,5 @@ export type ProviderProps = { locale?: string | undefined; fieldWrapper?: string; hasInlineOfferSwitch: boolean; + cardInfo?: string[][]; };