From 45f5cfec5c90b94e6cd0644c269700ee44e5bebd Mon Sep 17 00:00:00 2001 From: JG Date: Fri, 10 Jun 2022 09:33:49 +0100 Subject: [PATCH] accebility field on org page --- app/views/organisations/schemes.html.erb | 2 ++ spec/requests/organisations_controller_spec.rb | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/app/views/organisations/schemes.html.erb b/app/views/organisations/schemes.html.erb index 758fd4b12..b96e7bdc3 100644 --- a/app/views/organisations/schemes.html.erb +++ b/app/views/organisations/schemes.html.erb @@ -5,6 +5,8 @@ <%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Supported housing services", sub: nil } : { main: "Supported housing services", sub: current_user.organisation.name } %> +

Supported housing services

+ <%= render SearchComponent.new(current_user:, search_label: "Search by service name or code", value: @searched) %>
diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 1f504c9f7..5fc6cd94a 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -52,6 +52,11 @@ RSpec.describe OrganisationsController, type: :request do expect(page).to have_field("search", type: "search") end + it "has hidden accebility field with description" do + expected_field = "

Supported housing services

" + expect(CGI.unescape_html(response.body)).to include(expected_field) + end + it "shows only schemes belonging to the same organisation" do expect(page).to have_content(same_org_scheme.code) schemes.each do |scheme|