-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
RSpec.describe("Service Manual", type: :system) do | ||
let!(:content_item) { content_store_has_schema_example("service_manual_guide", "service_manual_guide") } | ||
let!(:path) { "/#{path_for(content_item)}" } | ||
|
||
it "has a search form scoped to the manual" do | ||
visit path | ||
|
||
expect(page).to have_css("input") | ||
end | ||
|
||
# it "tells slimmer to scope search results to the manual for a service manual guide" do | ||
# content_item = content_store_has_schema_example("service_manual_guide", "service_manual_guide") | ||
|
||
# expect(Slimmer::Processors::SearchParameterInserter).to receive(:new).with(hash_including: { | ||
# Slimmer::Headers::SEARCH_PARAMETERS_HEADER => { filter_manual: "/service-manual" }.to_json, | ||
# }) | ||
# get "/#{path_for(content_item)}" | ||
|
||
# # byebug | ||
# # expect(response.body).to have_css("input") | ||
# # assert_select("input[type='hidden'][name='filter_manual'][values='/service-manual']") | ||
# # expect(response.headers[Slimmer::Headers::SEARCH_PARAMETERS_HEADER]).to eq({ filter_manual: "/service-manual" }.to_json) | ||
# end | ||
|
||
# it("tells slimmer not to include a search box in the header for the service manual homepage") do | ||
# content_item = content_store_has_schema_example("service_manual_homepage", "service_manual_homepage") | ||
# get "/#{path_for(content_item)}" | ||
|
||
# expect(response.headers[Slimmer::Headers::REMOVE_SEARCH_HEADER]).to be true | ||
# end | ||
end |