From edba6d1f0cea99aeea9a120ecfd3ea729541f179 Mon Sep 17 00:00:00 2001 From: JG Date: Fri, 10 Jun 2022 09:29:53 +0100 Subject: [PATCH] accebility field --- app/views/schemes/index.html.erb | 2 ++ spec/requests/schemes_controller_spec.rb | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/app/views/schemes/index.html.erb b/app/views/schemes/index.html.erb index a1a05ae1d..9bf12634f 100644 --- a/app/views/schemes/index.html.erb +++ b/app/views/schemes/index.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/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 3f2e58d0b..35829d136 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -58,6 +58,11 @@ RSpec.describe SchemesController, type: :request do expect(CGI.unescape_html(response.body)).to match("#{schemes.count} total schemes.") 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 + context "when paginating over 20 results" do let(:total_schemes_count) { Scheme.count }