Merge pull request #28710 from overleaf/jel-no-sso-notifications-when-domain-capture

[web] Do not show notification to link to Commons SSO when domain is also for group with domain capture

GitOrigin-RevId: 6779e2db02d5d9cc4e7a60789a620403a4e4aa11
This commit is contained in:
Jessica Lawshe
2025-10-16 09:52:56 -05:00
committed by Copybot
parent ad3e8bd65d
commit 046449d4bd
5 changed files with 82 additions and 0 deletions
@@ -799,6 +799,29 @@ describe('ProjectListController', function () {
ctx.ProjectListController.projectListPage(ctx.req, ctx.res)
})
})
describe('group domain capture enabled for domain', function () {
it('does not show institution SSO available notification', function (ctx) {
ctx.UserGetter.promises.getUserFullEmails.resolves([
{
email: 'test@overleaf.com',
affiliation: {
group: { domainCaptureEnabled: true },
institution: {
id: 1,
confirmed: true,
name: 'Overleaf',
ssoBeta: false,
ssoEnabled: true,
},
},
},
])
ctx.res.render = (pageName, opts) => {
expect(opts.notificationsInstitution).to.deep.equal([])
ctx.ProjectListController.projectListPage(ctx.req, ctx.res)
}
})
})
})
describe('Without Institution SSO feature', function () {