From 53f5e365e18c29422272298458212d8960cb44d7 Mon Sep 17 00:00:00 2001 From: Louis Kirkham Date: Fri, 4 Aug 2023 14:29:54 +0100 Subject: [PATCH] Fix tests --- app/views/qae_form/_address_question.html.slim | 2 +- app/views/qae_form/_sub_fields_question.html.slim | 4 ++-- forms/qae_form_builder/address_question.rb | 2 +- forms/qae_form_builder/sub_fields_question.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/qae_form/_address_question.html.slim b/app/views/qae_form/_address_question.html.slim index 711cdb6dc2..2310b35faf 100644 --- a/app/views/qae_form/_address_question.html.slim +++ b/app/views/qae_form/_address_question.html.slim @@ -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" diff --git a/app/views/qae_form/_sub_fields_question.html.slim b/app/views/qae_form/_sub_fields_question.html.slim index 7e08faf020..420e8b07f6 100644 --- a/app/views/qae_form/_sub_fields_question.html.slim +++ b/app/views/qae_form/_sub_fields_question.html.slim @@ -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" diff --git a/forms/qae_form_builder/address_question.rb b/forms/qae_form_builder/address_question.rb index cab52cc487..4dc230e55f 100644 --- a/forms/qae_form_builder/address_question.rb +++ b/forms/qae_form_builder/address_question.rb @@ -1,4 +1,4 @@ -class QAEFormBuilder +class QaeFormBuilder class AddressQuestionValidator < SubFieldsQuestionValidator NO_VALIDATION_SUB_FIELDS = [:street, :county] end diff --git a/forms/qae_form_builder/sub_fields_question.rb b/forms/qae_form_builder/sub_fields_question.rb index 3b1c6b7f87..afbb0e39e6 100644 --- a/forms/qae_form_builder/sub_fields_question.rb +++ b/forms/qae_form_builder/sub_fields_question.rb @@ -1,4 +1,4 @@ -class QAEFormBuilder +class QaeFormBuilder class SubFieldsQuestionValidator < QuestionValidator NO_VALIDATION_SUB_FIELDS = [:honours] def errors