Skip to content

Conversation

@rileyseaburg
Copy link
Contributor

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_radio

  • Validation Logic:

    • Added ensure_a11_v2_radio_format method to enforce specific requirements for a11_v2_radio forms, such as mandatory questions and specific options for radio buttons (app/models/form.rb).
    • Updated the filtered_forms method to include a11_v2_radio in the list of valid form types (app/models/form.rb).
  • UI Enhancements:

    • Implemented a script to toggle visibility of questions based on radio button selections in a11_v2_radio forms (app/views/components/_form_a11_v2_radio_script.html.erb).
    • Adjusted the radio_buttons partial 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:

    • Added a new factory trait, :a11_v2_radio, with predefined questions and options for testing (spec/factories/form.rb). [1] [2]
  • Feature Tests:

    • Created feature tests for a11_v2_radio forms to verify question toggling and submission behavior (spec/features/touchpoints_spec.rb).
  • Model Tests:

    • Updated model tests to include a11_v2_radio in the list of valid form types (spec/models/form_spec.rb).

ryanwoldatwork and others added 10 commits May 2, 2025 10:57
first 3 show "what could have gone better"
last 2 show "what went well"
Bumps [rack-session](https://github.com/rack/rack-session) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/rack/rack-session/releases)
- [Changelog](https://github.com/rack/rack-session/blob/v2.1.1/releases.md)
- [Commits](rack/rack-session@v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: rack-session
  dependency-version: 2.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
A-11 v2 with Radio Buttons (5 options, conditional 2nd & 3rd question)
@rileyseaburg rileyseaburg merged commit e39431e into main May 21, 2025
9 checks passed
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.

3 participants