- {t('invited_to_group', {
- inviterName: teamInvite.inviterName,
- })}
+ ]
+ }
+ />
diff --git a/services/web/frontend/stylesheets/app/subscription.less b/services/web/frontend/stylesheets/app/subscription.less
index cf5694e938..143d8de790 100644
--- a/services/web/frontend/stylesheets/app/subscription.less
+++ b/services/web/frontend/stylesheets/app/subscription.less
@@ -77,6 +77,12 @@
margin: 3em 0;
}
+.team-invite {
+ .team-invite-name {
+ word-break: break-word;
+ }
+}
+
.capitalised {
text-transform: capitalize;
}
diff --git a/services/web/locales/en.json b/services/web/locales/en.json
index 5f35b5c7d0..4d8a6ec0be 100644
--- a/services/web/locales/en.json
+++ b/services/web/locales/en.json
@@ -897,7 +897,7 @@
"invite_not_accepted": "Invite not yet accepted",
"invite_not_valid": "This is not a valid project invite",
"invite_not_valid_description": "The invite may have expired. Please contact the project owner",
- "invited_to_group": "__inviterName__ has invited you to join a group subscription on __appName__",
+ "invited_to_group": "<0>__inviterName__0> has invited you to join a group subscription on __appName__",
"invited_to_group_have_individual_subcription": "__inviterName__ has invited you to join a group __appName__ subscription. If you join this group, you may not need your individual subscription. Would you like to cancel it?",
"invited_to_group_login": "To accept this invitation you need to log in as __emailAddress__.",
"invited_to_group_login_benefits": "As part of this group, you’ll have access to __appName__ premium features such as additional collaborators, greater maximum compile time, and real-time track changes.",
diff --git a/services/web/test/frontend/components/project-list/notifications/group-invitation.spec.tsx b/services/web/test/frontend/components/project-list/notifications/group-invitation.spec.tsx
index 4c09083177..5767302fed 100644
--- a/services/web/test/frontend/components/project-list/notifications/group-invitation.spec.tsx
+++ b/services/web/test/frontend/components/project-list/notifications/group-invitation.spec.tsx
@@ -42,7 +42,7 @@ describe('
', function () {
cy.findByRole('alert')
- cy.findByText(
+ cy.contains(
'inviter@overleaf.com has invited you to join a group subscription on Overleaf'
)
@@ -73,13 +73,13 @@ describe('
', function () {
cy.findByRole('alert')
- cy.findByText(
+ cy.contains(
'inviter@overleaf.com has invited you to join a group Overleaf subscription. If you join this group, you may not need your individual subscription. Would you like to cancel it?'
)
cy.findByRole('button', { name: 'Not now' }).click()
- cy.findByText(
+ cy.contains(
'inviter@overleaf.com has invited you to join a group subscription on Overleaf'
)
@@ -105,7 +105,7 @@ describe('
', function () {
cy.findByRole('alert')
- cy.findByText(
+ cy.contains(
'inviter@overleaf.com has invited you to join a group Overleaf subscription. If you join this group, you may not need your individual subscription. Would you like to cancel it?'
)
@@ -113,7 +113,7 @@ describe('
', function () {
cy.wait('@cancelPersonalSubscription')
- cy.findByText(
+ cy.contains(
'inviter@overleaf.com has invited you to join a group subscription on Overleaf'
)
diff --git a/services/web/test/frontend/features/project-list/components/notifications.test.tsx b/services/web/test/frontend/features/project-list/components/notifications.test.tsx
index b8454b210d..661afab257 100644
--- a/services/web/test/frontend/features/project-list/components/notifications.test.tsx
+++ b/services/web/test/frontend/features/project-list/components/notifications.test.tsx
@@ -415,8 +415,9 @@ describe('
', function () {
await fetchMock.flush(true)
fetchMock.delete(`/notifications/${notificationGroupInvite._id}`, 200)
screen.getByRole('alert')
+ screen.getByText('inviter@overleaf.com')
screen.getByText(
- /inviter@overleaf.com has invited you to join a group subscription on Overleaf/
+ /has invited you to join a group subscription on Overleaf/
)
screen.getByRole('button', { name: 'Join now' })
screen.getByRole('button', { name: /close/i })