# Features ## Personas - **Alice** : Nouvelle utilisatrice souhaitant rejoindre la plateforme pour discuter avec ses amis. - **Bob** : Utilisateur régulier, membre de plusieurs salons, aime organiser des conversations de groupe. - **Claire** : Administratrice, responsable de la gestion des rôles et des permissions. - **David** : Utilisateur invité, découvre la plateforme via une invitation à un salon. ## User Registration **Persona:** Alice **Scenario:** User registers into the application - Given Alice is on the registration page - When she provides valid details (username, email, password) - And she clicks "Register" - Then the username, email and password are validated by the system - And her account is created - And she receives a confirmation message - And she is redirected to the login page - And she receives a welcome email - When she tries to register with an existing email - Then the system displays an error message ## User Login **Persona:** Alice **Scenario:** User logs into the application - Given Alice is on the login page - When she enters valid credentials (email/username and password) - And she clicks "Login" - Then the credentials are validated by the system - And she is granted access to the application - When she enters an invalid password - Then the system displays an error message ## Role Management **Persona:** Claire **Scenario:** Admin creates and assigns roles - Given Claire is logged in as an admin - When she navigates to the roles management page - And she creates a new role or edits an existing one - Then the role is saved - And she can assign or unassign it to the users - When she tries to assign a role to herself - Then the system prevents self-assignment for certain roles (e.g., SuperAdmin) - When she deletes a role - Then the system asks for confirmation and updates all affected users ## Permission Management **Persona:** Claire **Scenario:** Admin manages permissions for roles - Given Claire is logged in as an admin - When she navigates to the permissions management page - And she assigns or removes permissions for a role - Then the permissions are updated - And users with that role have the correct accesses ## Send a Message **Persona:** Bob **Scenario:** User sends a message in a conversation - Given Bob is logged in - And he is in an existing conversation with other users - When he types a message - And he clicks "Send" - Then the message appears in the conversation for all participants - When he sends an empty message - Then the system prevents sending and shows a warning - When he sends a message with an attachment - Then the attachment is uploaded and visible to all participants ## Read Messages **Persona:** Alice **Scenario:** User reads messages in a conversation - Given Alice is logged in - And she has joined a conversation - When another user sends a message - Then the message appears in the conversation in real time - When she scrolls up, older messages are loaded ## Create a Conversation **Persona:** Bob **Scenario:** User creates a conversation with one or more users - Given Bob is logged in - When he clicks "New Conversation" - And he selects one or more users - And he clicks "Create" - Then a new conversation is created - And the selected users are added to the conversation - When he tries to create a conversation with himself only - Then the system prevents it and shows a message ## Salon Creation **Persona:** Bob **Scenario:** User creates a new salon - Given Bob is logged in - When he navigates to the "Create Salon" page - And he provides a salon name - And he clicks "Create" - Then a new salon is created - And Bob is added as a member of the salon - When he tries to create a salon with a name that already exists - Then the system displays an error message ## Invite Users to a Salon **Persona:** Bob, David **Scenario:** User invites others to join a salon - Given Bob is logged in - And he is a member of an existing salon - When he selects other users to invite (including David) - And he clicks "Invite" - Then the selected users receive an invitation - And they can join the salon once they accept - When David accepts the invitation - Then he becomes a member of the salon