Fix test for invite modal error (#26948)

* Fix test for invite modal error

* Update copy in tests

* Update copy
Этот коммит содержится в:
Daniel Espino García
2024-05-10 09:20:30 +02:00
коммит произвёл GitHub
родитель f0121d4f23
Коммит bd1a0a123d
5 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@@ -54,7 +54,7 @@ describe('Guest Account - Guest User Invitation Flow', () => {
invitePeople(newUser.username, 1, newUser.username);
// * Verify the content and message in next screen
verifyInvitationError(newUser.username, testTeam, 'This person is already a member.');
verifyInvitationError(newUser.username, testTeam, 'This person is already a member of the workspace. Invite them as a member instead of a guest.');
});
});
});
@@ -83,7 +83,7 @@ describe('Guest Account - Guest User Invitation Flow', () => {
invitePeople(regularUser.email, 1, regularUser.username);
// * Verify the content and message in next screen
verifyInvitationError(regularUser.username, testTeam, 'This person is already a member.');
verifyInvitationError(regularUser.username, testTeam, 'This person is already a member of the workspace. Invite them as a member instead of a guest.');
});
});

Просмотреть файл

@@ -198,7 +198,7 @@ describe('Guest Account - Guest User Invitation Flow', () => {
invitePeople(newUser.username, 1, newUser.username);
// * Verify the content and message in next screen
cy.findByText('This person is already a member.').should('be.visible');
cy.findByText('This person is already a member of the workspace. Invite them as a member instead of a guest.').should('be.visible');
// # Click on invite more button
cy.findByTestId('invite-more').click();

Просмотреть файл

@@ -401,14 +401,14 @@ describe('actions/invite_actions', () => {
],
notSent: [
{
reason: 'This person is already a member.',
reason: 'This person is already a member of the workspace. Invite them as a member instead of a guest.',
user: {
id: 'user1',
roles: 'system_user',
},
},
{
reason: 'This person is already a member.',
reason: 'This person is already a member of the workspace. Invite them as a member instead of a guest.',
user: {
id: 'other-user',
roles: 'system_user',
@@ -489,14 +489,14 @@ describe('actions/invite_actions', () => {
],
notSent: [
{
reason: 'This person is already a member.',
reason: 'This person is already a member of the workspace. Invite them as a member instead of a guest.',
user: {
id: 'user1',
roles: 'system_user',
},
},
{
reason: 'This person is already a member.',
reason: 'This person is already a member of the workspace. Invite them as a member instead of a guest.',
user: {
id: 'other-user',
roles: 'system_user',
@@ -520,7 +520,7 @@ describe('actions/invite_actions', () => {
sent: [],
notSent: [
{
reason: 'This person is already a member.',
reason: 'This person is already a member of the workspace. Invite them as a member instead of a guest.',
user: {
id: 'user1',
roles: 'system_user',
@@ -534,7 +534,7 @@ describe('actions/invite_actions', () => {
},
},
{
reason: 'This person is already a member.',
reason: 'This person is already a member of the workspace. Invite them as a member instead of a guest.',
user: {
id: 'other-user',
roles: 'system_user',

Просмотреть файл

@@ -116,7 +116,7 @@ export async function sendGuestInviteForUser(
members: RelationOneToOne<Channel, Record<string, ChannelMembership>>,
) {
if (!isGuest(user.roles)) {
return {notSent: {user, reason: localizeMessage('invite.members.user-is-not-guest', 'This person is already a member.')}};
return {notSent: {user, reason: localizeMessage('invite.members.user-is-not-guest', 'This person is already a member of the workspace. Invite them as a member instead of a guest.')}};
}
let memberOfAll = true;
let memberOfAny = false;

Просмотреть файл

@@ -3959,7 +3959,7 @@
"invite.members.invite-sent": "An invitation email has been sent.",
"invite.members.unable-to-add-the-user-to-the-team": "Unable to add the user to the team.",
"invite.members.user-is-guest": "Contact your admin to make this guest a full member.",
"invite.members.user-is-not-guest": "This person is already a member.",
"invite.members.user-is-not-guest": "This person is already a member of the workspace. Invite them as a member instead of a guest.",
"invite.rate-limit-exceeded": "Invite emails rate limit exceeded.",
"join_team_group_constrained_denied": "You need to be a member of a linked group to join this team.",
"join_team_group_constrained_denied_admin": "You need to be a member of a linked group to join this team. You can add a group to this team [here]({siteURL}/admin_console/user_management/groups).",