Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced start over #1

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<div class="form-group row">
<div class="submit-buttons col-md-9 offset-md-3">
<%= submit_tag t('blacklight.advanced_search.form.search_btn_html'), class: 'btn btn-primary advanced-search-submit', id: "advanced-search-submit" %>
<%= button_tag t('blacklight.advanced_search.form.start_over_html'), type: 'reset', class: 'btn btn-link advanced-search-start-over' %>
<%= link_to t('blacklight.advanced_search.form.start_over_html'), request.path, :class =>"btn btn-link advanced-search-start-over" %>
</div>
</div>
<% end %>
6 changes: 6 additions & 0 deletions spec/features/advanced_search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,11 @@
expect(page.current_url).to match(/bread/)
expect(page.current_url).not_to match(/medicine/)
end

it "clears the prepopulated fields when the Start Over button is pressed" do
expect(page).to have_field 'Title', with: 'medicine'
click_on 'Start over'
expect(page).not_to have_field 'Title', with: 'medicine'
end
end
end
Loading