Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDancingClown committed Aug 4, 2023
1 parent 0c974e1 commit 53f5e36
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/qae_form/_address_question.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ div role="group" id="q_#{question.key}"
.clear

- klass = "#{sub_field_title.parameterize == 'postcode' ? 'govuk-input--width-10' : 'govuk-input--width-20'}"
- klass <<(QAEFormBuilder::AddressQuestionValidator::NO_VALIDATION_SUB_FIELDS.exclude?(sub_field_key) ? " required" : " not-required")
- klass <<(QaeFormBuilder::AddressQuestionValidator::NO_VALIDATION_SUB_FIELDS.exclude?(sub_field_key) ? " required" : " not-required")
input.govuk-input.js-trigger-autosave[
class=klass
type="text"
Expand Down
4 changes: 2 additions & 2 deletions app/views/qae_form/_sub_fields_question.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ div role="group" id="#{question.key}"
- else
- klass = 'govuk-input--width-10'

- klass <<(QAEFormBuilder::SubFieldsQuestionValidator::NO_VALIDATION_SUB_FIELDS.exclude?(sub_field_key) ? " required" : " not-required")
- klass <<(QaeFormBuilder::SubFieldsQuestionValidator::NO_VALIDATION_SUB_FIELDS.exclude?(sub_field_key) ? " required" : " not-required")

input.govuk-input.js-trigger-autosave[
class=klass
type="text"
Expand Down
2 changes: 1 addition & 1 deletion forms/qae_form_builder/address_question.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class QAEFormBuilder
class QaeFormBuilder
class AddressQuestionValidator < SubFieldsQuestionValidator
NO_VALIDATION_SUB_FIELDS = [:street, :county]
end
Expand Down
2 changes: 1 addition & 1 deletion forms/qae_form_builder/sub_fields_question.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class QAEFormBuilder
class QaeFormBuilder
class SubFieldsQuestionValidator < QuestionValidator
NO_VALIDATION_SUB_FIELDS = [:honours]
def errors
Expand Down

0 comments on commit 53f5e36

Please sign in to comment.