💬(app-desk) change some texts
Change some texts on the team page.
This commit is contained in:
@@ -94,7 +94,7 @@ describe('MemberGrid', () => {
|
||||
expect(screen.getByText('user2@test.com')).toBeInTheDocument();
|
||||
expect(screen.getByText('user3@test.com')).toBeInTheDocument();
|
||||
expect(screen.getByText('Owner')).toBeInTheDocument();
|
||||
expect(screen.getByText('Admin')).toBeInTheDocument();
|
||||
expect(screen.getByText('Administration')).toBeInTheDocument();
|
||||
expect(screen.getByText('Member')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ describe('ModalRole', () => {
|
||||
|
||||
expect(
|
||||
screen.getByRole('radio', {
|
||||
name: 'Admin',
|
||||
name: 'Administration',
|
||||
}),
|
||||
).toBeChecked();
|
||||
|
||||
@@ -174,12 +174,14 @@ describe('ModalRole', () => {
|
||||
);
|
||||
|
||||
expect(
|
||||
screen.getByText('You are the last owner, you cannot change your role.'),
|
||||
screen.getByText(
|
||||
'You are the sole owner of this group. Make another member the group owner, before you can change your own role.',
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
|
||||
expect(
|
||||
screen.getByRole('radio', {
|
||||
name: 'Admin',
|
||||
name: 'Administration',
|
||||
}),
|
||||
).toBeDisabled();
|
||||
|
||||
@@ -232,7 +234,7 @@ describe('ModalRole', () => {
|
||||
|
||||
expect(
|
||||
screen.getByRole('radio', {
|
||||
name: 'Admin',
|
||||
name: 'Administration',
|
||||
}),
|
||||
).toBeDisabled();
|
||||
|
||||
@@ -274,7 +276,7 @@ describe('ModalRole', () => {
|
||||
|
||||
expect(
|
||||
screen.getByRole('radio', {
|
||||
name: 'Admin',
|
||||
name: 'Administration',
|
||||
}),
|
||||
).toBeEnabled();
|
||||
|
||||
|
||||
@@ -20,14 +20,6 @@ export const ChooseRole = ({
|
||||
|
||||
return (
|
||||
<RadioGroup>
|
||||
<Radio
|
||||
label={t('Admin')}
|
||||
value={Role.ADMIN}
|
||||
name="role"
|
||||
onChange={(evt) => setRole(evt.target.value as Role)}
|
||||
defaultChecked={defaultRole === Role.ADMIN}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<Radio
|
||||
label={t('Member')}
|
||||
value={Role.MEMBER}
|
||||
@@ -36,6 +28,14 @@ export const ChooseRole = ({
|
||||
defaultChecked={defaultRole === Role.MEMBER}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<Radio
|
||||
label={t('Administration')}
|
||||
value={Role.ADMIN}
|
||||
name="role"
|
||||
onChange={(evt) => setRole(evt.target.value as Role)}
|
||||
defaultChecked={defaultRole === Role.ADMIN}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<Radio
|
||||
label={t('Owner')}
|
||||
value={Role.OWNER}
|
||||
|
||||
@@ -55,7 +55,7 @@ export const MemberAction = ({
|
||||
color="primary-text"
|
||||
icon={<span className="material-icons">edit</span>}
|
||||
>
|
||||
<Text $theme="primary">{t('Update the role')}</Text>
|
||||
<Text $theme="primary">{t('Update role')}</Text>
|
||||
</Button>
|
||||
<Button
|
||||
aria-label={t('Open the modal to delete this member')}
|
||||
@@ -66,7 +66,7 @@ export const MemberAction = ({
|
||||
color="primary-text"
|
||||
icon={<span className="material-icons">delete</span>}
|
||||
>
|
||||
<Text $theme="primary">{t('Delete')}</Text>
|
||||
<Text $theme="primary">{t('Remove from group')}</Text>
|
||||
</Button>
|
||||
</Box>
|
||||
</DropButton>
|
||||
|
||||
@@ -69,7 +69,7 @@ export const MemberGrid = ({ team, currentRole }: MemberGridProps) => {
|
||||
});
|
||||
|
||||
const localizedRoles = {
|
||||
[Role.ADMIN]: t('Admin'),
|
||||
[Role.ADMIN]: t('Administration'),
|
||||
[Role.MEMBER]: t('Member'),
|
||||
[Role.OWNER]: t('Owner'),
|
||||
};
|
||||
|
||||
@@ -104,7 +104,9 @@ export const ModalRole = ({
|
||||
>
|
||||
<span className="material-icons">warning</span>
|
||||
{isLastOwner &&
|
||||
t('You are the last owner, you cannot change your role.')}
|
||||
t(
|
||||
'You are the sole owner of this group. Make another member the group owner, before you can change your own role.',
|
||||
)}
|
||||
{isOtherOwner && t('You cannot update the role of other owner.')}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
@@ -59,15 +59,9 @@ export const TeamInfo = ({ team, currentRole }: TeamInfoProps) => {
|
||||
$size="1.25rem"
|
||||
$margin={{ top: 'none' }}
|
||||
>
|
||||
{t('Members of “{{teamName}}“', {
|
||||
teamName: team.name,
|
||||
})}
|
||||
</Text>
|
||||
<Text $size="m">
|
||||
{t('Add people to the “{{teamName}}“ group.', {
|
||||
teamName: team.name,
|
||||
})}
|
||||
{team.name}
|
||||
</Text>
|
||||
<Text $size="m">{t('Group details')}</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
<Box
|
||||
|
||||
@@ -9,28 +9,25 @@
|
||||
"fr": {
|
||||
"translation": {
|
||||
"0 group to display.": "0 groupe à afficher.",
|
||||
"404 - Page not found": "404 - Page introuvable",
|
||||
"Access to the cells menu": "Accès au menu cellules",
|
||||
"Add": "Ajouter",
|
||||
"Add a member": "Ajouter un membre",
|
||||
"Add a team": "Ajouter un groupe",
|
||||
"Add members to the team": "Ajoutez des membres à votre groupe",
|
||||
"Add people to the “{{teamName}}“ group.": "Ajouter des personnes au groupe “{{teamName}}“.",
|
||||
"Add team icon": "Icône ajout de groupe",
|
||||
"Admin": "Admin",
|
||||
"Administration": "Administration",
|
||||
"Are you sure you want to delete {{teamName}} team?": "Êtes-vous sûr de vouloir supprimer le groupe {{teamName}}?",
|
||||
"Back to home page": "Retour à la page d'accueil",
|
||||
"Are you sure you want to remove this member from the {{team}} group?": "Êtes-vous sûr de vouloir supprimer ce membre du groupe {{team}}?",
|
||||
"Back to home page": "Retour à l'accueil",
|
||||
"Cancel": "Annuler",
|
||||
"Cells icon": "Icône Cellules",
|
||||
"Choose a role": "Choisissez un rôle",
|
||||
"Close the modal": "Fermer la modale",
|
||||
"Close the teams panel": "Fermer le menu des groupes",
|
||||
"Close the teams panel": "Fermer le panneau des groupes",
|
||||
"Confirm deletion": "Confirmer la suppression",
|
||||
"Contacts": "Contacts",
|
||||
"Content modal to delete the team": "Contenu modal pour supprimer le groupe",
|
||||
"Content modal to update the team": "Contenu modal pour mettre à jour le groupe",
|
||||
"Create a new team": "Créer un nouveau groupe",
|
||||
"Create new team card": "Carte créer une nouvelle équipe",
|
||||
"Create new team card": "Carte créer un nouveau groupe",
|
||||
"Create the team": "Créer le groupe",
|
||||
"Create your first team by clicking on the \"Create a new team\" button.": "Créez votre premier groupe en cliquant sur le bouton \"Créer un nouveau groupe\".",
|
||||
"Created at": "Créé le",
|
||||
@@ -40,59 +37,69 @@
|
||||
"Empty teams icon": "Icône de groupe vide",
|
||||
"Enter the new name of the selected team": "Entrez le nouveau nom du groupe sélectionné",
|
||||
"Equipes": "Equipes",
|
||||
"Equipes Description": "Description de Equipes",
|
||||
"Equipes Description": "Description des groupes",
|
||||
"Equipes Logo": "Equipes Logo",
|
||||
"Error occurred while logging out": "La déconnexion a échoué",
|
||||
"Failed to add {{name}} in the team": "Impossible d'ajouter {{name}} au groupe",
|
||||
"Failed to create the invitation for {{email}}": "Impossible de créer l'invitation pour {{email}}",
|
||||
"Favorite": "Favoris",
|
||||
"Find a member to add to the team": "Trouver un membre à ajouter au groupe",
|
||||
"Freedom Equality Fraternity Logo": "Logo Liberté Égalité Fraternité",
|
||||
"Group details": "Détails du groupe",
|
||||
"Groups": "Groupes",
|
||||
"Invitation sent to {{email}}": "Invitation envoyée à {{email}}",
|
||||
"Invite new members to {{teamName}}": "Invitez de nouveaux membres à rejoindre {{teamName}}",
|
||||
"It seems that the page you are looking for does not exist or cannot be displayed correctly.": "Il semble que la page que vous cherchez n'existe pas ou ne puisse pas être affichée correctement.",
|
||||
"Language": "Langue",
|
||||
"Language Icon": "Icône de langue",
|
||||
"Last Connecttion": "Dernière connexion",
|
||||
"Last update at": "Dernière modification le",
|
||||
"List members card": "Carte liste des membres",
|
||||
"Logout": "Déconnexion",
|
||||
"Logout": "Se déconnecter",
|
||||
"Mails": "Mails",
|
||||
"Marianne Logo": "Logo Marianne",
|
||||
"Member": "Membre",
|
||||
"Member icon": "Icône de membre",
|
||||
"Member {{name}} added to the team": "Membre {{name}} ajouté au groupe",
|
||||
"Members of “{{teamName}}“": "Membres de “{{teamName}}“",
|
||||
"My account": "Mon compte",
|
||||
"Name the team": "Nommer le groupe",
|
||||
"Names": "Noms",
|
||||
"New name...": "Nouveau nom...",
|
||||
"Open the member options modal": "Ouvrir les options de membre dans la fenêtre modale",
|
||||
"Open the teams panel": "Ouvrir le menu des groupes",
|
||||
"Open the modal to delete this member": "Ouvrir la fenêtre modale pour supprimer ce membre",
|
||||
"Open the modal to update the role of this member": "Ouvrir la fenêtre modale pour mettre à jour le rôle de ce membre",
|
||||
"Open the team options": "Ouvrir les options de groupe",
|
||||
"Ouch !": "Ooops !",
|
||||
"Open the teams panel": "Ouvrir le panneau des groupes",
|
||||
"Ouch !": "Ouch !",
|
||||
"Owner": "Propriétaire",
|
||||
"Profile picture": "Photo du profil",
|
||||
"Radio buttons to update the roles": "Boutons radio pour mettre à jour les rôles",
|
||||
"Recent": "Récent",
|
||||
"Recents": "Récents",
|
||||
"Remove from group": "Retirer du groupe",
|
||||
"Remove the member": "Supprimer le membre",
|
||||
"Roles": "Rôles",
|
||||
"Search": "Rechercher",
|
||||
"Search new members (name or email)": "Rechercher de nouveaux membres (nom ou email)",
|
||||
"Something bad happens, please refresh the page.": "Une erreur inattendue s'est produite, rechargez la page.",
|
||||
"Something bad happens, please retry.": "Une erreur inattendue s'est produite, rechargez la page.",
|
||||
"Sort teams icon": "Icône trier les groupes",
|
||||
"Sort the teams": "Trier les groupes",
|
||||
"Sort the teams by creation date ascendent": "Trier les groupes par date de création ascendante",
|
||||
"Sort the teams by creation date descendent": "Trier les groupes par date de création descendante",
|
||||
"State": "État",
|
||||
"Team name": "Nom du groupe",
|
||||
"Teams icon": "Icône de groupe",
|
||||
"The member has been removed from the team": "Le membre a été supprimé de votre groupe",
|
||||
"The role has been updated": "Le rôle a bien été mis à jour",
|
||||
"The team has been removed.": "Le groupe a été supprimé.",
|
||||
"The team has been updated.": "Le groupe a été mise à jour.",
|
||||
"Update role": "Modifier le rôle",
|
||||
"Update team {{teamName}}": "Modification du groupe {{teamName}}",
|
||||
"Update the role": "Mettre à jour ce rôle",
|
||||
"Update the role": "Modifier le rôle",
|
||||
"Update the team": "Mettre à jour le groupe",
|
||||
"Validate": "Valider",
|
||||
"Validate the modification": "Valider la modification",
|
||||
"You are the last owner, you cannot change your role.": "Vous êtes le dernier propriétaire, vous ne pouvez pas changer votre rôle.",
|
||||
"You are the last owner, you cannot be removed from your team.": "Vous êtes le dernier propriétaire, vous ne pouvez pas être retiré de votre groupe.",
|
||||
"You are the sole owner of this group. Make another member the group owner, before you can change your own role.": "Vous êtes l’unique propriétaire de ce groupe. Désignez un autre membre comme propriétaire du groupe, avant de pouvoir modifier votre propre rôle.",
|
||||
"You cannot remove other owner.": "Vous ne pouvez pas supprimer un autre propriétaire.",
|
||||
"You cannot update the role of other owner.": "Vous ne pouvez pas mettre à jour les rôles d'autre propriétaire.",
|
||||
"icon group": "icône groupe",
|
||||
"{{count}} member_many": "{{count}} membres",
|
||||
|
||||
@@ -48,7 +48,7 @@ export const createTeam = async (
|
||||
export const addNewMember = async (
|
||||
page: Page,
|
||||
index: number,
|
||||
role: 'Admin' | 'Owner' | 'Member',
|
||||
role: 'Administration' | 'Owner' | 'Member',
|
||||
fillText: string = 'test',
|
||||
) => {
|
||||
const responsePromiseSearchUser = page.waitForResponse(
|
||||
|
||||
@@ -77,7 +77,9 @@ test.describe('Members Create', () => {
|
||||
await expect(page.getByText(/Choose a role/)).toBeVisible();
|
||||
await expect(page.getByRole('radio', { name: 'Member' })).toBeChecked();
|
||||
await expect(page.getByRole('radio', { name: 'Owner' })).toBeVisible();
|
||||
await expect(page.getByRole('radio', { name: 'Admin' })).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('radio', { name: 'Administration' }),
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test('it sends a new invitation and adds a new member', async ({
|
||||
@@ -109,7 +111,7 @@ test.describe('Members Create', () => {
|
||||
await page.getByRole('option', { name: users[0].name }).click();
|
||||
|
||||
// Choose a role
|
||||
await page.getByRole('radio', { name: 'Admin' }).click();
|
||||
await page.getByRole('radio', { name: 'Administration' }).click();
|
||||
|
||||
const responsePromiseCreateInvitation = page.waitForResponse(
|
||||
(response) =>
|
||||
@@ -136,7 +138,7 @@ test.describe('Members Create', () => {
|
||||
|
||||
const table = page.getByLabel('List members card').getByRole('table');
|
||||
await expect(table.getByText(users[0].name)).toBeVisible();
|
||||
await expect(table.getByText('Admin')).toBeVisible();
|
||||
await expect(table.getByText('Administration')).toBeVisible();
|
||||
});
|
||||
|
||||
test('it try to add twice the same user', async ({ page, browserName }) => {
|
||||
|
||||
@@ -82,7 +82,7 @@ test.describe('Members Delete', () => {
|
||||
test('it deletes admin member', async ({ page, browserName }) => {
|
||||
await createTeam(page, 'member-delete-4', browserName, 1);
|
||||
|
||||
const username = await addNewMember(page, 0, 'Admin');
|
||||
const username = await addNewMember(page, 0, 'Administration');
|
||||
|
||||
const table = page.getByLabel('List members card').getByRole('table');
|
||||
|
||||
@@ -119,9 +119,9 @@ test.describe('Members Delete', () => {
|
||||
await myCells.nth(4).getByLabel('Member options').click();
|
||||
|
||||
// Change role to Admin
|
||||
await page.getByText('Update the role').click();
|
||||
await page.getByText('Update role').click();
|
||||
const radioGroup = page.getByLabel('Radio buttons to update the roles');
|
||||
await radioGroup.getByRole('radio', { name: 'Admin' }).click();
|
||||
await radioGroup.getByRole('radio', { name: 'Administration' }).click();
|
||||
await page.getByRole('button', { name: 'Validate' }).click();
|
||||
|
||||
const cells = table
|
||||
@@ -137,7 +137,7 @@ test.describe('Members Delete', () => {
|
||||
// To not be the only owner
|
||||
await addNewMember(page, 0, 'Owner');
|
||||
|
||||
const username = await addNewMember(page, 1, 'Admin', 'something');
|
||||
const username = await addNewMember(page, 1, 'Administration', 'something');
|
||||
|
||||
const table = page.getByLabel('List members card').getByRole('table');
|
||||
|
||||
@@ -149,9 +149,9 @@ test.describe('Members Delete', () => {
|
||||
await myCells.nth(4).getByLabel('Member options').click();
|
||||
|
||||
// Change role to Admin
|
||||
await page.getByText('Update the role').click();
|
||||
await page.getByText('Update role').click();
|
||||
const radioGroup = page.getByLabel('Radio buttons to update the roles');
|
||||
await radioGroup.getByRole('radio', { name: 'Admin' }).click();
|
||||
await radioGroup.getByRole('radio', { name: 'Administration' }).click();
|
||||
await page.getByRole('button', { name: 'Validate' }).click();
|
||||
|
||||
const cells = table
|
||||
|
||||
@@ -43,10 +43,12 @@ test.describe('Member Grid', () => {
|
||||
new RegExp(`E2E ${browserName}`, 'i'),
|
||||
);
|
||||
await cells.nth(4).getByLabel('Member options').click();
|
||||
await page.getByText('Update the role').click();
|
||||
await page.getByText('Update role').click();
|
||||
|
||||
await expect(
|
||||
page.getByText('You are the last owner, you cannot change your role.'),
|
||||
page.getByText(
|
||||
'You are the sole owner of this group. Make another member the group owner, before you can change your own role.',
|
||||
),
|
||||
).toBeVisible();
|
||||
|
||||
const radioGroup = page.getByLabel('Radio buttons to update the roles');
|
||||
|
||||
@@ -19,13 +19,11 @@ test.describe('Team', () => {
|
||||
await expect(page.getByLabel('icon group')).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('heading', {
|
||||
name: `Members of “${teamName}“`,
|
||||
name: teamName,
|
||||
level: 3,
|
||||
}),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByText(`Add people to the “${teamName}“ group.`),
|
||||
).toBeVisible();
|
||||
await expect(page.getByText(`Group details`)).toBeVisible();
|
||||
|
||||
await expect(page.getByText(`1 member`)).toBeVisible();
|
||||
|
||||
@@ -55,8 +53,6 @@ test.describe('Team', () => {
|
||||
.click();
|
||||
|
||||
await expect(page.getByText('The team has been updated.')).toBeVisible();
|
||||
await expect(
|
||||
page.getByText(`Add people to the “${teamName}“ group.`),
|
||||
).toBeVisible();
|
||||
await expect(page.getByText(`Group details`)).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -71,7 +71,7 @@ test.describe('Teams Create', () => {
|
||||
await page.getByText('Team name').fill(teamName);
|
||||
await page.getByRole('button', { name: 'Create the team' }).click();
|
||||
|
||||
const elTeam = page.getByText(`Members of “${teamName}“`);
|
||||
const elTeam = page.getByRole('heading', { name: teamName });
|
||||
await expect(elTeam).toBeVisible();
|
||||
|
||||
await panel.getByRole('button', { name: 'Add a team' }).click();
|
||||
|
||||
@@ -31,7 +31,7 @@ test.describe('Teams Delete', () => {
|
||||
|
||||
await addNewMember(page, 0, 'Owner');
|
||||
|
||||
// Change role to Admin
|
||||
// Change role to Administration
|
||||
const table = page.getByLabel('List members card').getByRole('table');
|
||||
const myCells = table
|
||||
.getByRole('row')
|
||||
@@ -39,9 +39,9 @@ test.describe('Teams Delete', () => {
|
||||
.getByRole('cell');
|
||||
await myCells.nth(4).getByLabel('Member options').click();
|
||||
|
||||
await page.getByText('Update the role').click();
|
||||
await page.getByText('Update role').click();
|
||||
const radioGroup = page.getByLabel('Radio buttons to update the roles');
|
||||
await radioGroup.getByRole('radio', { name: 'Admin' }).click();
|
||||
await radioGroup.getByRole('radio', { name: 'Administration' }).click();
|
||||
await page.getByRole('button', { name: 'Validate' }).click();
|
||||
|
||||
// Delete the team button should be hidden
|
||||
@@ -59,7 +59,7 @@ test.describe('Teams Delete', () => {
|
||||
|
||||
await addNewMember(page, 0, 'Owner');
|
||||
|
||||
// Change role to Admin
|
||||
// Change role to Administration
|
||||
const table = page.getByLabel('List members card').getByRole('table');
|
||||
const myCells = table
|
||||
.getByRole('row')
|
||||
@@ -67,7 +67,7 @@ test.describe('Teams Delete', () => {
|
||||
.getByRole('cell');
|
||||
await myCells.nth(4).getByLabel('Member options').click();
|
||||
|
||||
await page.getByText('Update the role').click();
|
||||
await page.getByText('Update role').click();
|
||||
const radioGroup = page.getByLabel('Radio buttons to update the roles');
|
||||
await radioGroup.getByRole('radio', { name: 'Member' }).click();
|
||||
await page.getByRole('button', { name: 'Validate' }).click();
|
||||
|
||||
Reference in New Issue
Block a user