diff --git a/BDD/answer_form.feature b/BDD/answer_form.feature new file mode 100644 index 0000000000..a6881fd8af --- /dev/null +++ b/BDD/answer_form.feature @@ -0,0 +1,18 @@ +Feature: Answer form + As a Class Participant + I want to answer the questionnaire about the class I am enrolled in + In order to submit my class evaluation + + Scenario: Happy Path - Successfully submit response + Given that I am on the "Form Screen" + And I must be able to view all questions + And I must be able to answer all available questions + When clicking "Submit response" + Then I am presented with a message that the response was successfully submitted. + + Scenario: Sad Path - Session expired + Given that I am on the "Form Screen" + And I must be able to view all questions + And I must be able to answer all available questions + When clicking "Submit response" + Then I am presented with a message that the session has ended and login is required again. \ No newline at end of file diff --git a/BDD/create_evaluation_form.feature b/BDD/create_evaluation_form.feature new file mode 100644 index 0000000000..c11dabe39b --- /dev/null +++ b/BDD/create_evaluation_form.feature @@ -0,0 +1,25 @@ +Feature: Create evaluation form + As an Administrator + I want to create a form based on a template for the classes I choose + In order to evaluate class performance in the current semester + + Scenario: Happy Path - Successfully create form + Given that I am on the admin screen + Then I should see a sidebar menu with a management option + When I click the management button + Then I should be redirected to a screen with a create form button + When I click the create form button + Then I should be presented with a modal where I must choose the corresponding classes for the form and the template to be used at the end of the modal, there should be a create button + When I click the create button + Then the new form should appear alongside the others + + Scenario: Sad Path - Missing required selections + Given that I am on the admin screen + Then I should see a sidebar menu with a management option + When I click the management button + Then I should be redirected to a screen with a create form button + When I click the create form button + Then I should be presented with a modal where I must choose the corresponding classes for the form and the template to be used + When I try to click the create button without selecting a template + Then I should see an error message "Please select a template" + And the form should not be created \ No newline at end of file diff --git a/BDD/create_form_template.feature b/BDD/create_form_template.feature new file mode 100644 index 0000000000..bf2cc00c0d --- /dev/null +++ b/BDD/create_form_template.feature @@ -0,0 +1,26 @@ +Feature: Create form template + As an administrator + I want to create a form template containing the form questions + In order to generate evaluation forms to assess class performance + + Scenario: Happy Path - Successfully create template + Given that I am on the admin screen + Then I should see a sidebar menu with the management option + When I click the management button + Then I should be redirected to a screen with an edit templates button + When I click the edit templates button + Then I should be redirected to a screen with all templates and a create new template button + Then a modal should appear with new template customization options + When I fill all customization options at the end of the modal, there should be a creation button + Then as I press the creation button, the new template should be ready for use and appear alongside all others. + + Scenario: Sad Path - Missing required field + Given that I am on the admin screen + Then I should see a sidebar menu with the management option + When I click the management button + Then I should be redirected to a screen with an edit templates button + When I click the edit templates button + Then I should be redirected to a screen with all templates and a create new template button + Then a modal should appear with new template customization options + When I fill everything except the template name and click the creation button + Then I should be presented with a message "the name is a required field" for template creation. \ No newline at end of file diff --git a/BDD/edit_delete_templates.feature b/BDD/edit_delete_templates.feature new file mode 100644 index 0000000000..49af1b1c20 --- /dev/null +++ b/BDD/edit_delete_templates.feature @@ -0,0 +1,37 @@ +Feature: Edit and delete templates without affecting existing forms + As an Administrator + I want to edit and/or delete a template I created without affecting already created forms + In order to organize existing templates + + Scenario: Happy Path - Successfully edit template + Given that I am on the "Administrator" screen + And I view the list of registered templates + When I click the "Edit" button of a specific template + Then I must be directed to the template editing screen + And I must see the existing fields filled with current information + When I modify the desired fields + And confirm the editing by clicking "Save changes" + Then the changes must be applied only to the template + And forms created previously must not be modified + And I must see a message indicating the template was successfully updated + + Scenario: Happy Path - Successfully delete template + Given that I am on the "Administrator" screen + And I view the list of registered templates + When I click the "Delete" button of a template + Then I must see a confirmation box asking "Are you sure you want to delete?" + And I must see a "Yes" button + And I must see a "No" button + When I click "Yes" + Then the selected template must be removed from the list + And no form created previously using this template must be altered or removed + And I must see a message indicating the template was successfully deleted + + Scenario: Sad Path - Administrator cancels template deletion attempt + Given that I am on the "Administrator" screen + And I view the list of registered templates + When I click the "Delete" button of a template + Then I must see the confirmation box for deletion + When I click the "No" button + Then I must return to the administrator screen + And the template must remain in the list \ No newline at end of file diff --git a/BDD/generate_admin_report.feature b/BDD/generate_admin_report.feature new file mode 100644 index 0000000000..fcfafc50b4 --- /dev/null +++ b/BDD/generate_admin_report.feature @@ -0,0 +1,22 @@ +Feature: Generate admin report + As an Administrator + I want to download a CSV file containing form results + In order to evaluate class performance + + Scenario: Happy Path - Successfully generate report + Given that I am on the admin screen + Then I should see a sidebar menu with a management option + When I click the management button + Then I should be redirected to a screen with all created forms available + And I should see a menu with the option to generate report for each form + When clicking the generate report button + Then the download of a CSV file containing the form results and graphs should start. + + Scenario: Sad Path - No responses to generate report + Given that I am on the admin screen + Then I should see a sidebar menu with a management option + When I click the management button + Then I should be redirected to a screen with all created forms available + And I should see a menu with the option to generate report for each form + When clicking the generate report button + Then I am presented with a message that it is not possible to generate a report because there are no submitted responses. \ No newline at end of file diff --git a/BDD/import_sigaa_data.feature b/BDD/import_sigaa_data.feature new file mode 100644 index 0000000000..0a3ba7a4e7 --- /dev/null +++ b/BDD/import_sigaa_data.feature @@ -0,0 +1,25 @@ +Feature: Import data from SIGAA + As an Administrator + I want to import data from SIGAA regarding classes, subjects, and participants + In order to populate the system's database + + Scenario: Happy Path - Successfully import classes + Given that I am on the admin screen + Then I should see a field "Insert Course Code" + When I insert the "Code" + And I click on "Search" + Then I should see the "Classes" for the course + And I should see an "Add" button for each one + When I click the "Add" button + Then the "Classes" are added to the "database" + + Scenario: Sad Path - Attempt to add existing class + Given that I am on the admin screen + Then I should see a field "Insert Course Code" + When I insert the "Code" + And I click on "Search" + Then I should see the "Classes" for the course + And I should see an "Add" button for each one + When I click the button + And it is an "Existing Class" + Then I see a warning "The class is already in the database" \ No newline at end of file diff --git a/BDD/login_system.feature b/BDD/login_system.feature new file mode 100644 index 0000000000..7bd3a6fa92 --- /dev/null +++ b/BDD/login_system.feature @@ -0,0 +1,24 @@ +Feature: Login system + As a system user + I want to access the system using a registered email or registration number and password + In order to answer forms or manage the system + + Scenario: Happy Path - Student login + Given that I am on the login screen as an student + Then I am presented with 2 input fields, one for email/registration and another for password + When filling with valid and matching email/registration and password + When clicking the login button + Then I should be redirected to the Evaluations screen, with a sidebar and available evaluations + + Scenario: Happy Path - Admin login + Given that I am on the login screen as a admin + Then I am presented with 2 input fields, one for email/registration and another for password + When filling with valid and matching email/registration and password + When clicking the login button + Then I should be redirected to the Evaluations screen, with a sidebar showing the evaluations and management sections. + + Scenario: Sad Path - Invalid credentials + Given that I am on the login screen + Then I am presented with 2 input fields, one for email/registration and another for password + When filling with valid email/registration but incompatible password + Then I am presented with a message that user or password is incorrect \ No newline at end of file diff --git a/BDD/password_reset_email.feature b/BDD/password_reset_email.feature new file mode 100644 index 0000000000..23766ad81a --- /dev/null +++ b/BDD/password_reset_email.feature @@ -0,0 +1,39 @@ +Feature: Password reset from email link + As a User + I want to reset my password using a secure email link + In order to regain access to my account when I forget my password + + Scenario: Happy Path - Successfully reset password + Given that I requested password reset on the login screen + And I received an email containing the link to reset my password + And the link is still valid and has not expired + When I access the link + And I enter a valid new password + And I confirm the new password correctly + And I click the confirm button + Then the system must save the new password + And must change my user status to "active" if it is pending + And must redirect me to the login page + And must display a message informing that the password was successfully reset. + + Scenario: Sad Path - Expired link + Given that I received an email containing the password reset link + When I try to access the link after the validity period + Then the system must block the reset + And must display a message informing that the link has expired + And must offer the option to request a new reset link + + Scenario: Sad Path - Invalid password or outside standards + Given that I am on the password reset page + When I enter a password that doesn't meet minimum requirements + And click confirm + Then the system must prevent the reset + And must display a message explaining the allowed password criteria. + + Scenario: Sad Path - Password confirmation mismatch + Given that I am on the password reset page + When I enter the new password + And I enter a different password confirmation + And click confirm + Then the system must prevent saving the new password + And must display a message indicating that the passwords do not match. \ No newline at end of file diff --git a/BDD/pasword_setup_system.feature b/BDD/pasword_setup_system.feature new file mode 100644 index 0000000000..ec08bc9218 --- /dev/null +++ b/BDD/pasword_setup_system.feature @@ -0,0 +1,39 @@ +Feature: Password setup system + As a User + I want to set a password for my user from the registration request email + In order to access the system + + Background: + Given that the user "fulano.novo@email.com" was imported and has "pending" status + And a valid password setup link was sent to "fulano.novo@email.com" + + Scenario: Happy Path - Successfully set password + Given that the user accesses the password setup link sent by email + And the link is valid and within the deadline + When the user enters a new password that meets the requirements + And confirms the same password correctly + And confirms the password creation + Then the password must be successfully registered + And the user status must be updated to "active" + And the user must be directed to the login page + + Scenario: Sad Path - Expired link + Given that the user accesses the password setup link received by email + And the link is expired + When the user tries to set a new password + Then the system must display a message informing that the link has expired + And must guide the user to request a new link + + Scenario: Sad Path - Invalid password requirements + Given that the user accesses the password setup link sent by email + And the link is still valid + When the user enters a password that doesn't meet security rules + Then the system must display a message explaining the mandatory password criteria + And the password must not be saved + + Scenario: Sad Path - User already active + Given that the user accesses the password setup link received previously + And the user's current status is "active" + When the user tries to create the initial password + Then the system must prevent the action + And must suggest the user use the "forgot my password" flow \ No newline at end of file diff --git a/BDD/register_system_user.feature b/BDD/register_system_user.feature new file mode 100644 index 0000000000..a8a98205be --- /dev/null +++ b/BDD/register_system_user.feature @@ -0,0 +1,28 @@ +Feature: Register system user + As an Administrator + I want to register SIGAA class participants by importing new user data into the system + So they can access the CAMAAR system + + Scenario: Happy Path - New users are registered + Given that I am logged in as Administrator in the panel + And I access the import SIGAA data functionality for a class + When I perform the data import + Then the system must identify users (teachers and students) that do not exist in the CAMAAR database + And must create a new record for each non-existent user, with "pending" status + And must save their basic data, including email, registration number, and name + And must automatically send an email requesting the user to set their initial password + And must display a message confirming that new users were successfully imported and registered. + + Scenario: Sad Path - Already registered users + Given that I perform the SIGAA data import for a class + When the system finds a user whose email is already registered in CAMAAR + Then the system must not create a new record + And must not send a new password setup email + And must simply ignore this user, maintaining the existing data + And must display a warning that "X users were already registered and thus ignored". + + Scenario: Sad Path - SIGAA data import failure + Given that I try to import SIGAA data for a class + When a communication failure with SIGAA occurs or the data returns invalid + Then the system must display an error message stating that the import could not be completed + And no user should be created, updated, or modified. \ No newline at end of file diff --git a/BDD/synchronize_database_sigaa.feature b/BDD/synchronize_database_sigaa.feature new file mode 100644 index 0000000000..d332d09059 --- /dev/null +++ b/BDD/synchronize_database_sigaa.feature @@ -0,0 +1,32 @@ +Feature: Synchronize database with SIGAA + As an Administrator + I want to update the existing database with current SIGAA data + In order to correct the system database + + Scenario: Happy Path - Successfully synchronize database + Given that I am logged in as Administrator + And I access the "Update SIGAA Database" functionality + And the system can communicate correctly with SIGAA + When I start the update + Then the system must identify all SIGAA users that already exist in the internal database + And must update only allowed data (name, registration number, affiliation) + And must log which users were updated and which fields were modified + And must display a message informing that the update was successfully completed. + + Scenario: Sad Path - Inconsistent SIGAA data + Given that I am logged in as Administrator + And I access the database update functionality + When the system receives invalid, incomplete, or inconsistent data from SIGAA + Then the update must be canceled + And no modification must be saved + And an error message must be displayed informing that SIGAA data is invalid + And the system must suggest trying again later. + + Scenario: Sad Path - Communication failure with SIGAA + Given that I am logged in as Administrator + And I access the database update functionality + When a communication failure with SIGAA occurs + Then the system must interrupt the operation + And no changes must be made + And an error message must be displayed informing that communication with SIGAA was not possible + And the system must guide the Administrator to check the connection or try again. \ No newline at end of file diff --git a/BDD/view_created_templates.feature b/BDD/view_created_templates.feature new file mode 100644 index 0000000000..7626d721d1 --- /dev/null +++ b/BDD/view_created_templates.feature @@ -0,0 +1,25 @@ +Feature: View created templates + As an Administrator + I want to view the created templates + In order to edit and/or delete a template I created + + Scenario: Happy Path - Edit template + Given that I am on the "Administrator" screen + Then I should see all "Templates" + And I should see an "Edit" button for each "Template" + And I should see another button for "Delete" + When I click the "Edit" button + Then I should see the template screen with fields for modification + + Scenario: Sad Path - Cancel template deletion + Given that I am on the "Administrator" screen + Then I should see all "Templates" + And I should see an "Edit" button for each "Template" + And I should see another button for "Delete" + When I click the "Delete" button + Then I should see a box with the text "Are you sure you want to delete?" + And I should see a button labeled "Yes" + And I should see another button labeled "No" + When I click the "No" button + Then I return to the Administrator Screen + And the template is still there \ No newline at end of file diff --git a/BDD/view_form_results.feature b/BDD/view_form_results.feature new file mode 100644 index 0000000000..59b9788395 --- /dev/null +++ b/BDD/view_form_results.feature @@ -0,0 +1,22 @@ +Feature: View form results + As an Administrator + I want to view the created forms + In order to generate a report from the responses + + Scenario: Happy Path - View form responses + Given that I am on the admin screen + Then I should see a sidebar menu with a management option + When I click the management button + Then I should be redirected to a screen with all created forms available + And I should see a menu with the option to view responses for each form + When clicking the view responses button + Then I should be directed to a page containing all user responses for viewing. + + Scenario: Sad Path - No responses available + Given that I am on the admin screen + Then I should see a sidebar menu with a management option + When I click the management button + Then I should be redirected to a screen with all created forms available + And I should see a menu with the option to view responses for each form + When clicking the view responses button + Then I am presented with a message that there are no submitted responses. \ No newline at end of file diff --git a/BDD/view_unanswered_forms.feature b/BDD/view_unanswered_forms.feature new file mode 100644 index 0000000000..21ef512c09 --- /dev/null +++ b/BDD/view_unanswered_forms.feature @@ -0,0 +1,16 @@ +Feature: View forms to answer + As a Class Participant + I want to view unanswered forms for the classes I am enrolled in + In order to choose which one to answer + + Scenario: Happy Path - View unanswered forms + Given that I am on the "Student" screen + Then I should see all "Unanswered Forms" + And I should see a "Answer Form" button for each one + When I click the "Answer Form" button + Then I should be taken to the "Form Screen" + + Scenario: Sad Path - No forms available + Given that I am on the "Student" screen + And there are no existing forms + Then I should see a text box saying "No forms available" \ No newline at end of file diff --git a/README.md b/README.md index 9d7fe1bf53..501dc94c84 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,250 @@ +## Integrantes + +- Jônatas Gonçalves Pereira Râmos Côrtes - 241031683 +- José Artur Nordestino Aguiar de Oliveira - 180020439 +- Davi César Silva Borges - 190105054 +- Victória Silva da Rocha - 200062875 + # CAMAAR + Sistema para avaliação de atividades acadêmicas remotas do CIC + +## Sprint 1 + +Sprint com objetivo de definir os requisitos técnicos e funcionais do projeto: +1. Especificar os cenários **BDD** das **histórias de usuário**. +2. Gerar um **MER** (Modelo Entidade Relacionamento) para a camada de persistência. +3. Fazer uma investigação técnica acerca da implementação das **views** do projeto. +4. Adicionar um arquivo **Markdown** contendo as informações sobre a sprint 1. +5. Definir quais funcionalidades serão desenvolvidas, suas respectivas regras de negócio, quem será o responsável por cada uma e a pontuação a ser atribuida. +6. Definir a **_política de branching_** a ser utilizada pelo grupo. + +### Primeira Etapa +Para a primeira etapa é necessário abordar os ítens 1, 4, 5, 6 descritos em #sprint-1 + +Quanto aos cenários BDD, utilizaremos a ferramenta `Cumcumber` e arquivos com extensão `.feature` para relatar os **Happy Paths** e **Sad Paths** referentes a cada uma das histórias de usuário. + +Quanto ao arquivo Markdown, este, em um primeiro momento, dissertará acerca das etapas do desenvolvimento da Sprint 1. + +Para os papéis de Scrum Master e Product Owner foram designados os membros **José Artur** e **Jônatas Gonçalves** respectivamente. + +As funcionalidades a serem desenvolvidas ao longo das próximas sprints serão descritas a seguir. + +--- + +### Importar dados do SIGAA (8 Pontos) + +**Responsável:** Jônatas Gonçalves Pereira Râmos Côrtes - 241031683 + +**Descrição:** Importar turmas, matérias e participantes a partir dos JSONs do repositório. + +**Critério / Regras de negócio:** +- Deve existir campo “Insira Código da Disciplina” na tela do administrador. +- Ao inserir código e clicar em “Pesquisar”, exibir as Turmas da disciplina retornadas pelo JSON. +- Em cada turma exibida, deve haver um botão “Adicionar”. +- Ao clicar em "Adicionar", a turma deve ser persistida na base de dados. +- Se a turma já existir, exibir aviso “A turma já está no banco de dados”. +- Em caso de erro no JSON ou falha, exibir mensagem de erro e não persistir dados. + +--- + +### Visualização de formulários para responder (3 Pontos) + +**Responsável:** Davi César Silva Borges - 190105054 + +**Descrição:** Tela do participante (Aluno) mostrando formulários não respondidos das turmas em que está matriculado. + +**Regras de negócio:** +- Na tela do Aluno deve-se listar apenas os “Formulários não respondidos” do aluno. +- Em cada formulário listado deve haver um botão “Responder Formulário”. +- Ao clicar em “Responder Formulário” o usuário é levado para a “Tela de Formulário”. +- Se não houver formulários, exibir texto "Não há formulários disponíveis". + +--- + +### Visualização dos templates criados (5 Pontos) + +**Responsável:** Victória Silva da Rocha - 200062875 + +**Descrição:** Administração — visualizar templates de formulário já criados, com opções de editar e deletar. + +**Regras de negócio:** +- Na tela do Administrador exibir todos os Templates existentes. +- Em cada template deve haver botão “Editar” e botão “Deletar”. +- Ao clicar em “Editar”, abrir a tela/modal do template com campos preenchidos para modificação. +- Ao clicar em “Deletar”, exibir caixa de confirmação com texto “Tem certeza que deseja deletar?”, botões “Sim” e “Não”. +- Se o usuário clicar em “Não” na confirmação, retornar para a tela de administrador e manter o template. + +--- + +### Criar template de formulário (5 Pontos) + +**Responsável:** Jônatas Gonçalves Pereira Râmos Côrtes - 241031683 + +**Descrição:** Fluxo para criação de um novo template de formulário via interface administrativa. + +**Regras de negócio:** +- Na tela de administrador existir menu lateral com opção de gerenciamento. +- No gerenciamento: botão “Editar Templates” que leva para lista de templates e botão de criação de novo template. +- A criação abre um modal com opções de personalização (nome, descrição, tipo de questão, obrigatoriedade, etc). +- Se todas as opções forem preenchidas corretamente, ao clicar em criar, o novo template aparece na lista. +- Se o nome do template não for preenchido, exibir mensagem “o nome é um campo de preenchimento obrigatório”. + +--- + +### Criar formulário de avaliação (5 Pontos) + +**Responsável:** Victória Silva da Rocha - 200062875 + +**Descrição:** Criar um formulário baseado em um template e atribuí-lo a uma ou mais turmas. + +**Regras de negócio:** +- Na tela de administrador, via Gerenciamento → Criar Formulário, exibir modal para escolher turmas e template. +- O modal deve listar turmas válidas (existentes) e templates disponíveis. +- Ao concluir e clicar em criar, o formulário deve aparecer na lista de formulários criados. +- (Sad Path restante a ser detalhado se necessário — ex.: erro sem turmas selecionadas, template inválido). + +--- + +### Cadastrar usuário do sistema (8 Pontos) + +**Responsável:** José Artur Nordestino Aguiar de Oliveira - 180020439 + +**Descrição:** Ao importar dados do SIGAA, identificar usuários novos e cadastrá-los no CAMAAR. + +**Regras de negócio:** +- Ao importar dados de uma turma, o sistema identifica usuários (docentes e discentes) não existentes no banco. +- Criar um novo registro para cada usuário inexistente com status “pendente”. +- Salvar dados básicos: e-mail, matrícula e nome. +- Enviar automaticamente e-mail solicitando definição de senha inicial. +- Exibir mensagem confirmando importação e cadastro dos novos usuários. +- Se encontrar usuário já cadastrado (e-mail existente), não criar novo registro, não enviar e-mail e exibir aviso “X usuários já estavam cadastrados e foram ignorados”. +- Em caso de falha de importação (comunicação/JSON inválido), não criar/alterar nenhum usuário e exibir erro. + +--- + +### Sistema de login (3 Pontos) + +**Responsável:** Victória Silva da Rocha - 200062875 + +**Descrição:** Autenticação por e-mail ou matrícula e senha para acesso ao sistema. + +**Regras de negócio:** +- Na tela de login: campos para email/matrícula e senha. +- Ao fornecer credenciais válidas, redirecionar para a tela de Avaliações. +- Se usuário for Administrador, exibir no menu lateral seção de gerenciamento; caso contrário, exibir apenas avaliações. +- Se credencial inválida (senha incompatível), exibir mensagem "usuário ou senha estão incorretos". + +--- + +### Visualização de resultados dos formulários (5 Pontos) + +**Responsável:** Davi César Silva Borges - 190105054 + +**Descrição:** Administrador visualiza formulários criados e acessa visualização das respostas submetidas. + +**Regras de negócio:** +- Na tela de Gerenciamento listar todos os formulários criados. +- Em cada formulário deve haver opção “Visualizar respostas”. +- Ao clicar, direcionar para página que contenha todas as respostas de todos os usuários (para visualização). +- Se não houver respostas submetidas, exibir mensagem informando ausência de respostas. + +--- + +### Gerar relatório do administrador (5 Pontos) + +**Responsável:** Victória Silva da Rocha - 200062875 + +**Descrição:** Gerar e baixar CSV contendo resultados de um formulário (incluindo gráficos). + +**Regras de negócio:** +- Na listagem de formulários em Gerenciamento, opção “Gerar relatório”. +- Ao clicar, iniciar download de arquivo CSV com resultados do formulário (e gráficos gerados). +- Se não houver respostas submetidas, exibir mensagem impedindo geração por falta de dados. + +--- + +### Responder formulário (5 Pontos) + +**Responsável:** Jônatas Gonçalves Pereira Râmos Côrtes - 241031683 + +**Descrição:** Permitir que o participante da turma visualize o formulário, responda todas as perguntas e envie suas respostas, garantindo retorno adequado em caso de sucesso ou sessão expirada. + +**Regras de negócio:** +- Ao acessar a tela do formulário, o usuário deve visualizar todas as perguntas disponíveis. +- O usuário deve conseguir preencher todas as respostas necessárias antes do envio. +- Ao clicar em "Enviar resposta", caso tudo esteja correto, o sistema deve registrar as respostas e exibir a mensagem "Resposta enviada com sucesso." +- Se a sessão do usuário estiver expirada no momento do envio, o sistema não deve registrar as respostas e deve exibir a mensagem "Sua sessão expirou, faça login novamente." +- Não permitir envio parcial ou com perguntas obrigatórias em branco. + +--- + +### Sistema de definição de senha (4 Pontos) + +**Responsável:** José Artur Nordestino Aguiar de Oliveira - 180020439 + +**Descrição:** Fluxo para usuário definir senha inicial a partir do link recebido por e-mail (após importação). + +**Regras de negócio:** +- Background: usuário importado tem status "pendente" e recebeu link válido. +- Se o link for válido e dentro do prazo: usuário informa nova senha que atende requisitos, confirma e a senha é registrada; status do usuário atualizado para "ativo"; redirecionar para página de login. +- Se o link estiver expirado: exibir mensagem que o link expirou e orientar a solicitar novo link. +- Se a senha não atender critérios mínimos: exibir mensagem explicativa e não salvar a senha. +- Se o usuário já tiver status "ativo": impedir criação inicial e sugerir uso do fluxo "esqueci minha senha". +- A senha deve conter ao menos uma letra maiúscula, uma letra minúscula, um número e um caractere especial. +- A senha deve conter ao menos 8 caracteres. + +--- + +### Edição e exclusão de templates sem afetar formulários existentes (3 Pontos) + +**Responsável:** José Artur Nordestino Aguiar de Oliveira - 180020439 + +**Descrição:** Editar/deletar templates de forma que formulários já criados com aquele template não sejam alterados. + +**Regras de negócio:** +- Ao editar um template, as alterações afetam somente o template (templates derivados), não os formulários já criados. +- Ao deletar um template, exibir confirmação (“Tem certeza...”) com opções “Sim” e “Não”. +- Se confirmar exclusão, remover o template da lista; nenhum formulário previamente criado que usou o template deve ser alterado. +- Se o administrador cancelar (clicar “Não”), retornar e manter o template. + +--- + +### Sincronizar base de dados com o SIGAA (8 Pontos) + +**Responsável:** Davi César Silva Borges - 190105054 + +**Descrição:** Atualizar dados já existentes na base local com informações mais recentes do SIGAA. + +**Regras de negócio:** +- Ao iniciar atualização, identificar usuários do SIGAA que já existem na base interna. +- Atualizar apenas campos permitidos (nome, matrícula, vínculo). +- Registrar em log quais usuários foram atualizados e quais campos foram modificados. +- Ao final, exibir mensagem de atualização concluída. +- Se receber dados inconsistentes/inválidos do SIGAA, cancelar a atualização, não salvar alterações e exibir erro sugerindo tentar novamente mais tarde. +- Se ocorrer falha de comunicação com SIGAA, interromper operação, não alterar dados e exibir mensagem de erro orientando a verificar conexão. + +--- + +### Reset de senha a partir do link recebido por email (1 Ponto) + +**Responsável:** Victória Silva da Rocha - 200062875 + +**Descrição:** Fluxo de redefinição de senha via link recebido no e-mail (forgot password). + +**Regras de negócio:** +- Se o link for válido e não expirado: usuário informa nova senha válida, confirma, confirma salvar — então senha é salva, status do usuário atualizado para "ativo" se pendente, redirecionar para login e exibir sucesso. +- Se link expirado: bloquear redefinição, exibir mensagem e oferecer opção de solicitar novo link. +- Se senha não atender aos requisitos mínimos: impedir reset e exibir mensagem explicativa. +- Se confirmação de senha diferente: impedir salvamento e exibir mensagem indicando que as senhas não coincidem. + +--- + +## Política de Branching (recapitulada) + +- Branch principal: `main` (estável) +- Branch de integração: Nomeada conforme a sprint +- Branch por funcionalidade: Nomeada conforme a funcionalidade +- Fluxo: criar novas branchs partir da branch da respectiva sprint, desenvolver funcionalidades, fazer Pull Requests, e ao final da sprint realizar o Merge entre a branch da sprint e a main. + +---