Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Conversation

jfcalvo
Copy link
Member

@jfcalvo jfcalvo commented Mar 15, 2024

Description

This PR add a new validation to QuestionUpdateValidator class so we are now validating visible_options attribute when it's updated.

The validation will avoid that the number specified for visible_options is bigger than the number of available options defined by the question.

Closes #75

Type of change

(Please delete options that are not relevant. Remember to title the PR according to the type of change)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (change restructuring the codebase without changing functionality)
  • Improvement (change adding some improvement to an existing functionality)
  • Documentation update

How Has This Been Tested

(Please describe the tests that you ran to verify your changes. And ideally, reference tests)

  • Adding new tests covering the feature.

Checklist

  • I added relevant documentation
  • follows the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I filled out the contributor form (see text above)
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

jfcalvo and others added 24 commits March 11, 2024 13:01
…or/improve-responses-and-suggestions-api-schemas
… into refactor/add-response-create-validator
…or/improve-responses-and-suggestions-api-schemas
… into refactor/add-response-create-validator
… into refactor/add-response-create-validator
@jfcalvo jfcalvo requested a review from frascuchon March 15, 2024 15:02
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.45%. Comparing base (a78fb2d) to head (98f9c0c).

Additional details and impacted files
@@                              Coverage Diff                               @@
##           refactor/response-and-suggestion-refactors      #76      +/-   ##
==============================================================================
+ Coverage                                       90.44%   90.45%   +0.01%     
==============================================================================
  Files                                             191      191              
  Lines                                            9406     9416      +10     
==============================================================================
+ Hits                                             8507     8517      +10     
  Misses                                            899      899              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jfcalvo jfcalvo linked an issue Mar 15, 2024 that may be closed by this pull request
Base automatically changed from refactor/add-question-validators to refactor/response-and-suggestion-refactors March 19, 2024 10:50
…dd-question-update-visible-options-validation
@jfcalvo jfcalvo merged commit db96020 into refactor/response-and-suggestion-refactors Mar 19, 2024
13 checks passed
@jfcalvo jfcalvo deleted the feat/add-question-update-visible-options-validation branch March 19, 2024 11:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Add questions update visible_options validation
2 participants