diff --git a/app/views/form/guidance/_finding_scheme.erb b/app/views/form/guidance/_finding_scheme.erb index d2dea2202..8101c5a6d 100644 --- a/app/views/form/guidance/_finding_scheme.erb +++ b/app/views/form/guidance/_finding_scheme.erb @@ -1,6 +1,6 @@ <%= govuk_details(summary_text: "Can’t find your scheme?") do %>

Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 "Which organisation owns this property?"

If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.

-

<%= govuk_link_to("View your organisation’s schemes", schemes_path) %>

+

<%= govuk_link_to("View your organisation’s schemes", clear_filters_url(filter_type: "schemes")) %>

<%= govuk_link_to("Read more about how schemes have changed", scheme_changes_path) %>

<% end %> diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index da80693ec..2d43e9b02 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -99,6 +99,20 @@ RSpec.describe "Schemes scheme Features" do expect(page).not_to have_link("Clear", href: "/clear-filters?filter_type=schemes") end end + + context "when on the scheme question page" do + let(:lettings_log) { FactoryBot.create(:lettings_log, assigned_to: user, needstype: 2) } + + it "open from guidance page with filters cleared" do + expect(page).to have_text("2 filters applied") + visit("/lettings-logs/#{lettings_log.id}/scheme") + find(".govuk-details__summary").click + expect(page).to have_link("View your organisation’s schemes") + click_link "View your organisation’s schemes" + expect(page).to have_current_path("/organisations/#{user.organisation.id}/schemes") + expect(page).to have_text("No filters applied") + end + end end end end