Browse Source

include GovukVisuallyHiddenHelper in helpers

update-version-test
Kat 12 months ago
parent
commit
82f906d547
  1. 1
      app/helpers/check_answers_helper.rb
  2. 1
      app/helpers/duplicate_logs_helper.rb
  3. 1
      app/helpers/log_actions_helper.rb
  4. 1
      app/helpers/tab_nav_helper.rb
  5. 1
      app/helpers/tasklist_helper.rb
  6. 1
      spec/components/create_log_actions_component_spec.rb
  7. 2
      spec/features/form/validations_spec.rb

1
app/helpers/check_answers_helper.rb

@ -1,5 +1,6 @@
module CheckAnswersHelper
include GovukLinkHelper
include GovukVisuallyHiddenHelper
def display_answered_questions_summary(subsection, lettings_log, current_user)
total = total_count(subsection, lettings_log, current_user)

1
app/helpers/duplicate_logs_helper.rb

@ -1,5 +1,6 @@
module DuplicateLogsHelper
include GovukLinkHelper
include GovukVisuallyHiddenHelper
def duplicate_logs_continue_button(all_duplicates, duplicate_log, original_log)
if all_duplicates.count > 1

1
app/helpers/log_actions_helper.rb

@ -1,5 +1,6 @@
module LogActionsHelper
include GovukLinkHelper
include GovukVisuallyHiddenHelper
def edit_actions_for_log(log)
back = back_button_for(log)

1
app/helpers/tab_nav_helper.rb

@ -1,5 +1,6 @@
module TabNavHelper
include GovukLinkHelper
include GovukVisuallyHiddenHelper
def user_cell(user)
link_text = user.name.presence || user.email

1
app/helpers/tasklist_helper.rb

@ -1,5 +1,6 @@
module TasklistHelper
include GovukLinkHelper
include GovukVisuallyHiddenHelper
include CollectionTimeHelper
def breadcrumb_logs_title(log, current_user)

1
spec/components/create_log_actions_component_spec.rb

@ -3,6 +3,7 @@ require "rails_helper"
RSpec.describe CreateLogActionsComponent, type: :component do
include GovukComponentsHelper
include GovukLinkHelper
include GovukVisuallyHiddenHelper
let(:component) { described_class.new(user:, log_type:, bulk_upload:) }
let(:render) { render_inline(component) }

2
spec/features/form/validations_spec.rb

@ -64,7 +64,7 @@ RSpec.describe "validations" do
it "shows validation for over 120" do
visit("/lettings-logs/#{id}/person-1-age")
fill_in_number_question(empty_lettings_log.id, "age1", 121, "person-1-age")
expect(page).to have_selector("#govuk-error-summary__title")
expect(page).to have_selector(".govuk-error-summary__title")
expect(page).to have_selector("#lettings-log-age1-error")
expect(page).to have_selector("#lettings-log-age1-field-error")
expect(page).to have_title("Error")

Loading…
Cancel
Save