diff --git a/doc/feature_001.md b/doc/feature_001.md index e123a65..99b9f0c 100644 --- a/doc/feature_001.md +++ b/doc/feature_001.md @@ -1,76 +1,113 @@ # 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 a new user is on the registration page -- When they provide valid details (username, email, password) -- And they click "Register" +- 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 their account is created -- And they receive a confirmation message +- 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 a registered user is on the login page -- When they enter valid credentials (email/username and password) -- And they click "Login" +- 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 they are granted access to the application +- 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 an admin is logged in -- When they navigate to the roles management page -- And they create a new role or edit an existing one +- 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 they can assign or unassign it to the users +- 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 an admin is logged in -- When they navigate to the permissions management page -- And they assign or remove permissions for a role +- 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 a user is logged in -- And they are in an existing conversation with other users -- When they type a message -- And they click "Send" +- 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 a user is logged in -- And they have joined 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 a user is logged in -- When they click "New Conversation" -- And they select one or more users -- And they click "Create" +- 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 a user is logged in -- When they navigate to the "Create Salon" page -- And they provide a salon name -- And they click "Create" +- 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 the user is added as a member of the salon +- 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 a user is logged in -- And they are a member of an existing salon -- When they select other users to invite -- And they click "Invite" +- 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 \ No newline at end of file +- And they can join the salon once they accept +- When David accepts the invitation +- Then he becomes a member of the salon \ No newline at end of file diff --git a/doc/feature_001.mkdn b/doc/feature_001.mkdn deleted file mode 100644 index 99b9f0c..0000000 --- a/doc/feature_001.mkdn +++ /dev/null @@ -1,113 +0,0 @@ -# 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 \ No newline at end of file