mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #35516 from overleaf/rh-cio-commons-ai
[web] Send Commons AI attribute to customer.io GitOrigin-RevId: de010cc34f4e1a854a730ec39212845e1c05d4b1
This commit is contained in:
@@ -123,6 +123,47 @@ describe('CustomerIoPlanHelpers', function () {
|
||||
expect(properties.enterprise_commons).to.equal(false)
|
||||
})
|
||||
|
||||
it('sets commons_ai=true when the user has active commons access at a writefullCommonsAccount institution', function () {
|
||||
const properties = CustomerIoPlanHelpers.getAffiliationProperties([
|
||||
{
|
||||
emailHasInstitutionLicence: true,
|
||||
affiliation: {
|
||||
institution: { writefullCommonsAccount: true },
|
||||
},
|
||||
},
|
||||
])
|
||||
expect(properties.commons_ai).to.equal(true)
|
||||
})
|
||||
|
||||
it('sets commons_ai=false when affiliated with a writefullCommonsAccount institution but without active commons access', function () {
|
||||
const properties = CustomerIoPlanHelpers.getAffiliationProperties([
|
||||
{
|
||||
emailHasInstitutionLicence: false,
|
||||
affiliation: {
|
||||
institution: { writefullCommonsAccount: true },
|
||||
},
|
||||
},
|
||||
])
|
||||
expect(properties.commons_ai).to.equal(false)
|
||||
})
|
||||
|
||||
it('sets commons_ai=false when active access is not at a writefullCommonsAccount institution', function () {
|
||||
const properties = CustomerIoPlanHelpers.getAffiliationProperties([
|
||||
{
|
||||
emailHasInstitutionLicence: true,
|
||||
affiliation: {
|
||||
institution: { commonsAccount: true },
|
||||
},
|
||||
},
|
||||
])
|
||||
expect(properties.commons_ai).to.equal(false)
|
||||
})
|
||||
|
||||
it('sets commons_ai=false when there are no emails', function () {
|
||||
const properties = CustomerIoPlanHelpers.getAffiliationProperties([])
|
||||
expect(properties.commons_ai).to.equal(false)
|
||||
})
|
||||
|
||||
it('sets domain_capture=true when an affiliation has domain capture enabled', function () {
|
||||
const properties = CustomerIoPlanHelpers.getAffiliationProperties([
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user