mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #21377 from overleaf/mf-add-countryCode-to-view-plans-and-interstitial-page-new
[web] Add missing `countryCode` in new-design plans page and all variants of the interstitial payment page GitOrigin-RevId: e3a410e89a6745d042f9747a01960618eb622733
This commit is contained in:
parent
d0df44b190
commit
1547325073
2 changed files with 33 additions and 0 deletions
|
@ -397,6 +397,7 @@ async function interstitialPaymentPage(req, res) {
|
||||||
latamCountryBannerDetails,
|
latamCountryBannerDetails,
|
||||||
skipLinkTarget: req.session?.postCheckoutRedirect || '/project',
|
skipLinkTarget: req.session?.postCheckoutRedirect || '/project',
|
||||||
websiteRedesignPlansVariant: websiteRedesignPlansAssignment.variant,
|
websiteRedesignPlansVariant: websiteRedesignPlansAssignment.variant,
|
||||||
|
countryCode,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -525,6 +525,16 @@ describe('SubscriptionController', function () {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
it('should return correct countryCode', function (done) {
|
||||||
|
this.GeoIpLookup.promises.getCurrencyCode.resolves({
|
||||||
|
countryCode: 'MX',
|
||||||
|
})
|
||||||
|
this.res.render = (page, opts) => {
|
||||||
|
expect(opts.countryCode).to.equal('MX')
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
this.SubscriptionController.plansPage(this.req, this.res)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('plansPage light touch redesign', function () {
|
describe('plansPage light touch redesign', function () {
|
||||||
|
@ -772,6 +782,17 @@ describe('SubscriptionController', function () {
|
||||||
this.SubscriptionController.plansPageLightDesign(this.req, this.res)
|
this.SubscriptionController.plansPageLightDesign(this.req, this.res)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should return correct countryCode', function (done) {
|
||||||
|
this.GeoIpLookup.promises.getCurrencyCode.resolves({
|
||||||
|
countryCode: 'MX',
|
||||||
|
})
|
||||||
|
this.res.render = (page, opts) => {
|
||||||
|
expect(opts.countryCode).to.equal('MX')
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
this.SubscriptionController.plansPageLightDesign(this.req, this.res)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('interstitialPaymentPage', function () {
|
describe('interstitialPaymentPage', function () {
|
||||||
|
@ -959,6 +980,17 @@ describe('SubscriptionController', function () {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should return correct countryCode', function (done) {
|
||||||
|
this.GeoIpLookup.promises.getCurrencyCode.resolves({
|
||||||
|
countryCode: 'MX',
|
||||||
|
})
|
||||||
|
this.res.render = (page, opts) => {
|
||||||
|
expect(opts.countryCode).to.equal('MX')
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
this.SubscriptionController.interstitialPaymentPage(this.req, this.res)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('successfulSubscription', function () {
|
describe('successfulSubscription', function () {
|
||||||
|
|
Loading…
Reference in a new issue