Skip to content

Commit

Permalink
Fix facet collapsing spec
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Jan 8, 2018
1 parent a1f3696 commit ca77dc2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions spec/features/search_filters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
expect(page).to have_selector("span.selected", :text => "Tibetan")
expect(page).to have_selector("span.facet-count.selected", :text => "1")
end
within(".blacklight-pub_date") do
within(".blacklight-pub_date") do
expect(page).to have_selector("span.selected", :text => "2004")
expect(page).to have_selector("span.facet-count.selected", :text => "1")
end
Expand Down Expand Up @@ -104,7 +104,7 @@
expect(page).to have_selector("span.selected", :text => "Tibetan")
expect(page).to have_selector("span.facet-count.selected", :text => "1")
end
within(".blacklight-pub_date") do
within(".blacklight-pub_date") do
expect(page).to have_selector("span.selected", :text => "2004")
expect(page).to have_selector("span.facet-count.selected", :text => "1")
end
Expand All @@ -115,7 +115,7 @@
expect(page).to have_selector("span.selected", :text => "Tibetan")
expect(page).to have_selector("span.facet-count.selected", :text => "1")
end
within(".blacklight-pub_date") do
within(".blacklight-pub_date") do
expect(page).to have_selector("span.selected", :text => "2004")
expect(page).to have_selector("span.facet-count.selected", :text => "1")
end
Expand Down Expand Up @@ -187,16 +187,18 @@
visit root_path
within(".blacklight-subject_topic_facet") do
expect(page).not_to have_selector(".card-block", :visible => true)
click_link "Topic"
find(".card-header").click
expect(page).to have_selector(".card-block", :visible => true)
end
end
it "keeps selected facets expanded on page load", :js => true do
skip("Test passes locally but not on Travis.") if ENV['TRAVIS']
visit root_path
within(".blacklight-subject_topic_facet") do
click_link "Topic"
find(".card-header").click
expect(page).to have_selector(".panel-collapse", :visible => true)
end
within(".blacklight-subject_topic_facet") do
click_link "Japanese drama"
end
within(".blacklight-subject_topic_facet") do
Expand Down

0 comments on commit ca77dc2

Please sign in to comment.