Skip to content

Commit

Permalink
Merge eff2e02 into fed4685
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jul 18, 2018
2 parents fed4685 + eff2e02 commit 4069a36
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/blacklight/_facets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
.facet-limit {
margin-bottom: $spacer;

.card-block {
.card-body {
padding: $spacer;
}
}
Expand Down Expand Up @@ -147,7 +147,7 @@
}
}



/* style for pivot facet's nested list */

Expand Down
2 changes: 1 addition & 1 deletion app/views/catalog/_facet_layout.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h3 class="panel-title card-header <%= "collapsed" if should_collapse_facet?(facet_field) %> collapse-toggle facet-field-heading" data-toggle="collapse" data-target="#<%= facet_field_id(facet_field) %>">
<%= link_to facet_field_label(facet_field.key), "##{ facet_field_id(facet_field)}", "data-turbolinks": false %>
</h3>
<div id="<%= facet_field_id(facet_field) %>" class="card-block panel-collapse facet-content <%= should_collapse_facet?(facet_field) ? 'collapse' : 'show' %>">
<div id="<%= facet_field_id(facet_field) %>" class="card-body panel-collapse facet-content <%= should_collapse_facet?(facet_field) ? 'collapse' : 'show' %>">
<div class="panel-body">
<%= yield %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/catalog/_home_text.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<%# This is the same panel shown in the Rails welcome template %>
<div id="about" class="card">
<h2 class='card-header collapsed collapse-toggle' data-toggle="collapse" data-target="#about-content"><a href="/rails/info/properties">About your application&rsquo;s environment</a></h2>
<div id="about-content" class="card-block collapse"></div>
<div id="about-content" class="card-body collapse"></div>
</div>

<script>
Expand Down
2 changes: 1 addition & 1 deletion app/views/catalog/_show_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% unless @document.more_like_this.empty? %>
<div class="card">
<div class="card-header">More Like This</div>
<div class="card-block">
<div class="card-body">
<%= render :collection => @document.more_like_this, :partial => 'show_more_like_this', :as => :document %>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions spec/features/search_filters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,25 +170,25 @@
skip("Test passes locally but not on Travis.") if ENV['TRAVIS']
visit root_path
within(".blacklight-subject_ssim") do
expect(page).not_to have_selector(".card-block", :visible => true)
expect(page).not_to have_selector(".card-body", :visible => true)
end
end
it "expands when the heading is clicked", :js => true do
skip("Test passes locally but not on Travis.") if ENV['TRAVIS']
visit root_path
within(".blacklight-subject_ssim") do
expect(page).not_to have_selector(".card-block", :visible => true)
expect(page).not_to have_selector(".card-body", :visible => true)
find(".card-header").click
expect(page).to have_selector(".card-block", :visible => true)
expect(page).to have_selector(".card-body", :visible => true)
end
end
it "expands when the anchor is clicked", :js => true do
skip("Test passes locally but not on Travis.") if ENV['TRAVIS']
visit root_path
within(".blacklight-subject_ssim") do
expect(page).not_to have_selector(".card-block", :visible => true)
expect(page).not_to have_selector(".card-body", :visible => true)
find(".card-header").click
expect(page).to have_selector(".card-block", :visible => true)
expect(page).to have_selector(".card-body", :visible => true)
end
end
it "keeps selected facets expanded on page load", :js => true do
Expand Down
4 changes: 2 additions & 2 deletions spec/views/catalog/_facet_layout.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
it "is collapsable" do
render partial: 'catalog/facet_layout', locals: { facet_field: facet_field }
expect(rendered).to have_selector '.card-header.collapsed'
expect(rendered).to have_selector '.collapse.card-block'
expect(rendered).to have_selector '.collapse.card-body'
end

it "is configured to be open by default" do
allow(facet_field).to receive_messages(collapse: false)
render partial: 'catalog/facet_layout', locals: { facet_field: facet_field }
expect(rendered).to_not have_selector '.card-header.collapsed'
expect(rendered).to have_selector '.show.card-block'
expect(rendered).to have_selector '.show.card-body'
end
end

0 comments on commit 4069a36

Please sign in to comment.