Merge pull request #24576 from overleaf/ii-flexible-group-licensing-replace-users-with-licenses

[web] Replace "users" with "licenses" in flexible licensing

GitOrigin-RevId: c262f802c92e7ce82f8dc60badf8e6147c5da4e5
This commit is contained in:
ilkin-overleaf
2025-03-31 08:04:50 +00:00
committed by Copybot
parent 61ce012fb5
commit b223bb8da8
12 changed files with 79 additions and 79 deletions
@@ -15,7 +15,7 @@ describe('<AddSeats />', function () {
cy.mount(<AddSeats />)
cy.findByRole('button', { name: /add users/i })
cy.findByRole('button', { name: /add licenses/i })
cy.findByTestId('add-more-users-group-form')
})
@@ -35,22 +35,22 @@ describe('<AddSeats />', function () {
})
})
it('shows the "Add more users" label', function () {
cy.findByText(/add more users/i)
it('shows the "Add more licenses" label', function () {
cy.findByText(/add more licenses/i)
})
it('shows the maximum supported users', function () {
cy.findByText(
new RegExp(
`your current plan supports up to ${this.totalLicenses} users`,
`your current plan supports up to ${this.totalLicenses} licenses`,
'i'
)
)
})
it('shows instructions on how to reduce users on a plan', function () {
it('shows instructions on how to reduce licenses on a plan', function () {
cy.contains(
/if you want to reduce the number of users on your plan, please contact customer support/i
/if you want to reduce the number of licenses on your plan, please contact customer support/i
).within(() => {
cy.findByRole('link', { name: /contact customer support/i }).should(
'have.attr',
@@ -90,7 +90,7 @@ describe('<AddSeats />', function () {
describe('cost summary', function () {
beforeEach(function () {
cy.findByLabelText(/how many users do you want to add/i).as('input')
cy.findByLabelText(/how many licenses do you want to add/i).as('input')
})
it('shows the title', function () {
@@ -103,7 +103,7 @@ describe('<AddSeats />', function () {
afterEach(function () {
cy.findByTestId('cost-summary').within(() => {
cy.findByText(
/enter the number of users you’d like to add to see the cost breakdown/i
/enter the number of licenses you’d like to add to see the cost breakdown/i
)
})
})
@@ -139,7 +139,7 @@ describe('<AddSeats />', function () {
this.numberOfUsersExceedingMaxLimit = MAX_NUMBER_OF_USERS + 1
cy.get('@input').type(this.numberOfUsersExceedingMaxLimit.toString())
cy.findByRole('button', { name: /add users/i }).should('not.exist')
cy.findByRole('button', { name: /add licenses/i }).should('not.exist')
cy.findByRole('button', { name: /send request/i }).as('sendRequestBtn')
})
@@ -147,7 +147,7 @@ describe('<AddSeats />', function () {
cy.findByTestId('cost-summary').should('not.exist')
cy.findByRole('alert').should(
'contain.text',
`If you want more than ${MAX_NUMBER_OF_USERS} users on your plan, we need to add them for you. Just click Send request below and we’ll be happy to help.`
`If you want more than ${MAX_NUMBER_OF_USERS} licenses on your plan, we need to add them for you. Just click Send request below and we’ll be happy to help.`
)
})
@@ -237,7 +237,7 @@ describe('<AddSeats />', function () {
},
}
cy.findByRole('button', { name: /add users/i }).as('addUsersBtn')
cy.findByRole('button', { name: /add licenses/i }).as('addUsersBtn')
cy.findByRole('button', { name: /send request/i }).should('not.exist')
})
@@ -251,7 +251,7 @@ describe('<AddSeats />', function () {
cy.findByTestId('cost-summary').within(() => {
cy.contains(
new RegExp(
`you’re adding ${this.adding} users to your plan giving you a total of ${this.body.change.addOn.quantity} users`,
`you’re adding ${this.adding} licenses to your plan giving you a total of ${this.body.change.addOn.quantity} licenses`,
'i'
)
)
@@ -287,7 +287,7 @@ describe('<AddSeats />', function () {
})
cy.findByText(
/we’ll charge you now for the cost of your additional users based on the remaining months of your current subscription/i
/we’ll charge you now for the cost of your additional licenses based on the remaining months of your current subscription/i
)
cy.findByText(
/after that, we’ll bill you \$1,000\.00 \(\$895\.00 \+ \$105\.00 tax\) annually on December 1, unless you cancel/i
@@ -342,9 +342,9 @@ describe('<AddSeats />', function () {
makeRequest(204, this.adding.toString())
cy.findByTestId('title').should(
'contain.text',
'You’ve added more user(s)'
'You’ve added more license(s)'
)
cy.findByText(/you’ve added more user\(s\) to your subscription/i)
cy.findByText(/you’ve added more license\(s\) to your subscription/i)
cy.findByRole('link', { name: /invite people/i }).should(
'have.attr',
'href',
@@ -532,7 +532,7 @@ describe('GroupMembers', function () {
)
cy.findByTestId('group-size-details').contains(
'You have 2 users and your plan supports up to 10. Add more users.'
'You have 2 licenses and your plan supports up to 10. Add more licenses.'
)
cy.findByTestId('add-more-members-form').within(() => {
cy.contains('Invite more members')
@@ -552,11 +552,11 @@ describe('GroupMembers', function () {
)
cy.findByTestId('group-size-details').contains(
'You have 1 user and your plan supports up to 10. Add more users.'
'You have 1 license and your plan supports up to 10. Add more licenses.'
)
})
it('renders the group members page without "add more users" link when not admin', function () {
it('renders the group members page without "add more licenses" link when not admin', function () {
cy.window().then(win => {
win.metaAttributesCache.set('ol-users', [this.JOHN_DOE])
win.metaAttributesCache.set('ol-canUseAddSeatsFeature', false)
@@ -569,8 +569,8 @@ describe('GroupMembers', function () {
)
cy.findByTestId('group-size-details').within(() => {
cy.findByText(/you have \d+ user and your plan supports up to \d+/i)
cy.findByText(/add more users/i).should('not.exist')
cy.findByText(/you have \d+ license and your plan supports up to \d+/i)
cy.findByText(/add more licenses/i).should('not.exist')
})
})
})
@@ -56,8 +56,8 @@ describe('<UpgradeSubscription />', function () {
})
})
it('shows the "Add more users to my plan" label', function () {
cy.findByText(/add more users to my plan/i).should(
it('shows the "Add more licenses to my plan" label', function () {
cy.findByText(/add more licenses to my plan/i).should(
'have.attr',
'href',
'/user/subscription/group/add-users'
@@ -126,7 +126,7 @@ describe('<UpgradeSubscription />', function () {
})
it('shows total users', function () {
cy.findByText(/you have 2 users on your subscription./i)
cy.findByText(/you have 2 licenses on your subscription./i)
})
})