feat: add marketing url to subscription upsell (#32560)

This commit is contained in:
Nawfal Ahmed
2023-06-23 17:54:15 +05:00
committed by GitHub
parent ef0fa643f5
commit 80d151b404
7 changed files with 30 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ describe('Sidebar View', () => {
let view = null;
const context = {
marketingUrl: 'https://www.example.org/programs',
subscriptionsMarketingUrl: 'https://www.example.org/program-subscriptions',
isUserB2CSubscriptionsEnabled: true,
};
@@ -53,8 +54,7 @@ describe('Sidebar View', () => {
expect(view.$('.js-subscription-upsell a span:last').html().trim())
.toEqual('Explore subscription options');
expect(view.$('.js-subscription-upsell a').attr('href'))
.not
.toEqual(context.marketingUrl);
.toEqual('https://www.example.org/program-subscriptions');
});
it('should load the exploration panel given a marketing URL', () => {
@@ -72,6 +72,7 @@ describe('Sidebar View', () => {
el: '.sidebar',
context: {
isUserB2CSubscriptionsEnabled: true,
subscriptionsMarketingUrl: '',
},
});
view.render();