Skip to content

Commit

Permalink
more precise opening up of ToC in OHMS search, with fixed more precis…
Browse files Browse the repository at this point in the history
…e capybara script
  • Loading branch information
jrochkind committed Dec 12, 2024
1 parent ca2de71 commit 8966e17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/frontend/javascript/audio/ohms_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ Search.clearSearchResults = function() {
//
// * If id is in a tab that isn't currently visible, switch to that tab.
//
// * If id is in a bootstrap collapsed that isn't currently expanded, expand it.
// (intended for Table of Contents section)
// * If id contains a collapsible ToC that isn't shown, show it.
//
// Second optional argument is either "smooth" or "auto", with "auto" being the
// default. As in HTML5 scroll functions which it will be passed to, "smooth"
Expand All @@ -236,7 +235,7 @@ Search.scrollToId = function(domID, scrollBehavior) {

// If our target element CONTAINS a bootstrap collapsible that is collapsed,
// show it. This is intended for our ToC accordion.
var collapsible = $(element).find(".collapse");
var collapsible = $(element).find(".collapse.ohms-index-list");
if (collapsible && ! collapsible.hasClass("show")) {
collapsible.collapse("show");
}
Expand Down
2 changes: 2 additions & 0 deletions spec/system/oral_history_with_audio_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@
click_on "Search"
end

click_on "Share link"

copy_to_clipboard = "*[data-trigger='linkClipboardCopy']"
begin
expect(page).to have_selector(copy_to_clipboard, wait: 0.05)
Expand Down

0 comments on commit 8966e17

Please sign in to comment.