Skip to content

Automatiza teste para validação de campos obrigatórios vazios na fase de Formalização#374

Open
jgaguiarm wants to merge 7 commits into
developfrom
feature/automates-test-validate-tramit-required-fields-empty-formalization-phase
Open

Automatiza teste para validação de campos obrigatórios vazios na fase de Formalização#374
jgaguiarm wants to merge 7 commits into
developfrom
feature/automates-test-validate-tramit-required-fields-empty-formalization-phase

Conversation

@jgaguiarm

@jgaguiarm jgaguiarm commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

… de formalização.

✅ Descrição do propósito desse Pull Request

Automatiza teste para validação de campos obrigatórios vazios na fase de Formalização

🧭 Referência a Issue

#373

❓ O que foi feito para atingir isso?


🏃‍♀️ Tipo de mudança

Marque as opções relevantes:

  • Bug fix (correção de bug)
  • Nova feature (mudança não retrocompatível que adiciona funcionalidade)
  • Mudança de breaking (correção ou feature que faria com que a funcionalidade existente não funcionasse como esperado)
  • Documentação (somente mudanças ou atualizações na documentação)

🕵️ Como foi testado?

  • Critério de aceitação
  • Testes de software (TDD, BDD, UNITÁRIO, INTEGRAÇÃO, E2E)

Checklist: ✔️

  • Meu código segue as diretrizes do projeto
  • Eu fiz um code review com minha equipe
  • Eu comentei meu código, especialmente em áreas de difícil entendimento
  • Eu atualizei a documentação correspondente
  • Testes novos e existentes passaram localmente com minhas alterações

Observação:

Summary by CodeRabbit

  • New Features

    • Added validation when attempting to proceed with an incomplete formalization.
    • The system now identifies and displays missing required fields.
  • Bug Fixes

    • Improved navigation to the project’s Formalization tab.
    • Enhanced interaction with formalization fields, document attachments, and workflow actions.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6d6f1a4e-d4de-4389-bbf6-c18145926b92

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/automates-test-validate-tramit-required-fields-empty-formalization-phase

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jgaguiarm
jgaguiarm marked this pull request as draft July 6, 2026 19:13
@jgaguiarm jgaguiarm changed the title Automatiza teste para validação de campos obrigatórios vazios na fase Automatiza teste para validação de campos obrigatórios vazios na fase de Formalização Jul 6, 2026
@jgaguiarm
jgaguiarm requested a review from CaffeineIssues July 8, 2026 17:56
@jgaguiarm
jgaguiarm marked this pull request as ready for review July 8, 2026 17:56

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cypress/pages/project/formalizationTab/elements.js`:
- Line 9: Update the selector values in the FormalizationTab elements
definitions to exactly match the corresponding data-cy attributes in
FormalizationTab.vue: eparceriasCertificateDate, responsibleAtAsjurInput,
termSignatureSentAtInput, and sentToOfficeAt must use
eparcerias-certificate-date, responsible-at-asjur-input,
term-signature-sent-at-input, and sent-to-office-at-input respectively, so
fillRequiredFields() locates all required elements.

In `@cypress/pages/project/formalizationTab/FormalizationTab.js`:
- Line 51: Update fillRequiredFields to accept a deliberationSelected parameter
and use selectDropdownOption with deliberationSelect to choose the provided
value, matching reportStatusSelect behavior; update every caller to pass the
intended deliberation value so the required field is populated instead of merely
opened.

In `@cypress/pages/project/ProjectPage.js`:
- Around line 186-188: Fix validateRequiredFields in the Project class by
delegating the accessFormalizationTab call to a FormalizationWorkflow instance,
importing FormalizationWorkflow as needed and passing the existing role, notice,
and project arguments; alternatively remove the unused method if it is not
required.

In `@resources/js/Pages/ProjectDetails/Partials/Tabs/FormalizationTab.vue`:
- Around line 680-684: Add the `data-cy="official-gazette-file-input"` attribute
to the actual file input within the official gazette field, or update the
`officialGazetteFileInput` selector in the `FormalizationTab` page object to
find `input[type="file"]` inside the `FormField` wrapper so `attachFile` targets
the correct element.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bbf73633-1a59-4da6-9787-d77c8cc014c7

📥 Commits

Reviewing files that changed from the base of the PR and between b3d0353 and 5096eae.

📒 Files selected for processing (8)
  • cypress/e2e/efomento/projects/formalization.cy.js
  • cypress/pages/project/ProjectPage.js
  • cypress/pages/project/formalizationTab/FormalizationTab.js
  • cypress/pages/project/formalizationTab/elements.js
  • cypress/pages/project/formalizationTab/index.js
  • cypress/support/workflows/FormalizationWorkflow.js
  • resources/js/Pages/ProjectDetails/Partials/Tabs/Actions/TramitButton.vue
  • resources/js/Pages/ProjectDetails/Partials/Tabs/FormalizationTab.vue
💤 Files with no reviewable changes (1)
  • cypress/pages/project/formalizationTab/index.js

Comment thread cypress/pages/project/formalizationTab/elements.js Outdated
Comment thread cypress/pages/project/formalizationTab/FormalizationTab.js Outdated
Comment thread cypress/pages/project/ProjectPage.js Outdated
@jgaguiarm
jgaguiarm marked this pull request as draft July 14, 2026 12:35
@jgaguiarm
jgaguiarm marked this pull request as ready for review July 14, 2026 12:40
@jgaguiarm
jgaguiarm requested a review from Junior-Shyko July 14, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants