Merge pull request #23366 from overleaf/ii-flexible-licensing-add-seats-for-all-legacy-plans

[web] Add seats feature for smaller groups

GitOrigin-RevId: 7b0d1ea61eaaf603610d5fd8df399c00d328be70
This commit is contained in:
ilkin-overleaf
2025-02-05 09:05:32 +00:00
committed by Copybot
parent 098d91f0bb
commit 667b97664c
7 changed files with 641 additions and 260 deletions
@@ -56,7 +56,6 @@ describe('SubscriptionGroupController', function () {
.stub()
.resolves(this.createSubscriptionChangeData),
ensureFlexibleLicensingEnabled: sinon.stub().resolves(),
ensureAddSeatsEnabled: sinon.stub().resolves(),
getGroupPlanUpgradePreview: sinon
.stub()
.resolves(this.previewSubscriptionChangeData),
@@ -337,9 +336,6 @@ describe('SubscriptionGroupController', function () {
this.SubscriptionGroupHandler.promises.ensureFlexibleLicensingEnabled
.calledWith(this.plan)
.should.equal(true)
this.SubscriptionGroupHandler.promises.ensureAddSeatsEnabled
.calledWith(this.plan)
.should.equal(true)
page.should.equal('subscriptions/add-seats')
props.subscriptionId.should.equal(this.subscriptionId)
props.groupName.should.equal(this.subscription.teamName)
@@ -379,21 +375,6 @@ describe('SubscriptionGroupController', function () {
this.Controller.addSeatsToGroupSubscription(this.req, res)
})
it('should redirect to subscription page when "add seats" is not enabled', function (done) {
this.SubscriptionGroupHandler.promises.ensureAddSeatsEnabled = sinon
.stub()
.rejects()
const res = {
redirect: url => {
url.should.equal('/user/subscription')
done()
},
}
this.Controller.addSeatsToGroupSubscription(this.req, res)
})
})
describe('previewAddSeatsSubscriptionChange', function () {