From ca77dc253990b92512f902d3955b19e57a858b20 Mon Sep 17 00:00:00 2001 From: Chris Beer Date: Mon, 8 Jan 2018 11:51:43 -0800 Subject: [PATCH] Fix facet collapsing spec --- spec/features/search_filters_spec.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spec/features/search_filters_spec.rb b/spec/features/search_filters_spec.rb index 5d5c05f9ff..0bfb71d26b 100644 --- a/spec/features/search_filters_spec.rb +++ b/spec/features/search_filters_spec.rb @@ -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 @@ -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 @@ -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 @@ -187,7 +187,7 @@ 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 @@ -195,8 +195,10 @@ 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