Skip to content

Commit f03ae61

Browse files
jpengstJP Engstrom
andauthored
align new search button when no search session (#1190)
Co-authored-by: JP Engstrom <jpengstrom@macbook-pro.lan>
1 parent d30d2c6 commit f03ae61

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

app/views/catalog/show.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
<%= render 'previous_next_doc' if @search_context %>
88
</div>
99
<% else %>
10-
<div id="showSearchButtons" class="show-buttons" >
10+
<div id="appliedParams" class="row constraints-container">
11+
<div id="showSearchButtons" class="show-buttons" >
1112
<%= render 'start_over' %>
13+
</div>
1214
</div>
1315
<% end %>
1416

spec/system/show_page_spec.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,24 @@
344344
end
345345
end
346346

347+
context 'direct URL access without search session' do
348+
before do
349+
visit 'catalog/111'
350+
end
351+
it 'has expected css with constraints-container wrapper' do
352+
expect(page).to have_css '.constraints-container'
353+
expect(page).to have_css '.show-buttons'
354+
expect(page).to have_css '.btn-show'
355+
end
356+
it 'shows "New Search" button properly positioned' do
357+
expect(page).to have_button "New Search"
358+
expect(page).to have_xpath("//button[@href='/catalog']")
359+
end
360+
it 'does not show "Back to Search Results" button' do
361+
expect(page).not_to have_content "Back to Search Results"
362+
end
363+
end
364+
347365
context 'Universal Viewer' do
348366
it 'does not have a .json extension in the src attribute' do
349367
visit '/catalog?search_field=all_fields&q='

0 commit comments

Comments
 (0)