Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for a new form type,
a11_v2_radio, with enhancements to validation, UI behavior, and test coverage. The changes primarily focus on ensuring the new form type adheres to specific requirements, updating related UI components, and adding tests to verify functionality.New Form Type:
a11_v2_radioValidation Logic:
ensure_a11_v2_radio_formatmethod to enforce specific requirements fora11_v2_radioforms, such as mandatory questions and specific options for radio buttons (app/models/form.rb).filtered_formsmethod to includea11_v2_radioin the list of valid form types (app/models/form.rb).UI Enhancements:
a11_v2_radioforms (app/views/components/_form_a11_v2_radio_script.html.erb).radio_buttonspartial to ensure proper rendering of radio button options and labels (app/views/components/forms/question_types/_radio_buttons.html.erb).Testing and Factory Updates
Factories:
:a11_v2_radio, with predefined questions and options for testing (spec/factories/form.rb). [1] [2]Feature Tests:
a11_v2_radioforms to verify question toggling and submission behavior (spec/features/touchpoints_spec.rb).Model Tests:
a11_v2_radioin the list of valid form types (spec/models/form_spec.rb).