Automatiza teste para validação de campos obrigatórios vazios na fase de Formalização#374
Conversation
… de formalização.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…quired-fields-empty-formalization-phase
There was a problem hiding this comment.
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
📒 Files selected for processing (8)
cypress/e2e/efomento/projects/formalization.cy.jscypress/pages/project/ProjectPage.jscypress/pages/project/formalizationTab/FormalizationTab.jscypress/pages/project/formalizationTab/elements.jscypress/pages/project/formalizationTab/index.jscypress/support/workflows/FormalizationWorkflow.jsresources/js/Pages/ProjectDetails/Partials/Tabs/Actions/TramitButton.vueresources/js/Pages/ProjectDetails/Partials/Tabs/FormalizationTab.vue
💤 Files with no reviewable changes (1)
- cypress/pages/project/formalizationTab/index.js
…quired-fields-empty-formalization-phase
…quired-fields-empty-formalization-phase
… 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:
🕵️ Como foi testado?
Checklist: ✔️
Observação:
Summary by CodeRabbit
New Features
Bug Fixes