diff --git a/.env.test b/.env.test index 3057cdc0b..fc0d8a4d2 100644 --- a/.env.test +++ b/.env.test @@ -27,7 +27,9 @@ EDS_PASS=test EDS_USE_CACHE=false CATALOGUE_SEARCH_URL=http://test.host/catalog.json FINDING_AIDS_SEARCH_URL=http://test.host/finding-aids/catalog.json -EBSCO_SEARCH_URL=https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true + +EBSCO_SEARCH_URL=https://research.ebsco.com/c/ciw6tp/search/results +EBSCO_PUB_FINDER_URL=https://publications.ebsco.com/c/elukgh GLOBAL_MESSAGE_URL=http://test.nla.gov.au/catalogue-message/1234 diff --git a/app/helpers/single_search_helper.rb b/app/helpers/single_search_helper.rb index 95cd4410e..9008110c6 100644 --- a/app/helpers/single_search_helper.rb +++ b/app/helpers/single_search_helper.rb @@ -30,16 +30,16 @@ def bento_all_results_link(key) bento_query = (params[:q] || params[:query])&.gsub("&", "%26") link = if key.start_with?("ebsco_eds_keyword") ebsco_link = if bento_query.present? - "#{ENV["EBSCO_SEARCH_URL"]}&custid=#{ENV["EDS_ORG"]}&bquery=#{bento_query}" + "#{ENV["EBSCO_SEARCH_URL"]}?q=#{bento_query}&limiters=FT1%3AY&searchMode=all&searchSegment=all-results" else - "#{ENV["EBSCO_SEARCH_URL"]}&custid=#{ENV["EDS_ORG"]}" + ENV["EBSCO_SEARCH_URL"].to_s end ebsco_link elsif key == "ebsco_eds_title" ebsco_link = if bento_query.present? - "#{ENV["EBSCO_SEARCH_URL"]}&custid=#{ENV["EDS_ORG"]}&bquery=TI+#{bento_query}" + "#{ENV["EBSCO_PUB_FINDER_URL"]}?searchField=titlename&searchtype=contains&highlightTag=mark&search=#{bento_query}" else - "#{ENV["EBSCO_SEARCH_URL"]}&custid=#{ENV["EDS_ORG"]}" + ENV["EBSCO_PUB_FINDER_URL"].to_s end ebsco_link elsif key == "finding_aids" diff --git a/config/initializers/bento_search.rb b/config/initializers/bento_search.rb index b177469cf..c38850b88 100644 --- a/config/initializers/bento_search.rb +++ b/config/initializers/bento_search.rb @@ -3,7 +3,7 @@ conf.user_id = ENV["EDS_USER"] conf.password = ENV["EDS_PASS"] conf.profile = ENV["EDS_PROFILE"] - conf.title = "eResources (Online articles & ebooks)" + conf.title = "eResources (Online articles & chapters)" conf.for_display = {decorator: "EbscoEdsArticleDecorator"} conf.all_results_link = ENV["EDS_ALL_RESULTS_LINK"] end @@ -13,7 +13,7 @@ conf.user_id = ENV["EDS_USER"] conf.password = ENV["EDS_PASS"] conf.profile = ENV["EDS_PROFILE"] - conf.title = "eResources (Online journals)" + conf.title = "eResources (Online publications)" conf.for_display = {decorator: "EbscoEdsArticleDecorator"} conf.all_results_link = ENV["EDS_ALL_RESULTS_LINK"] conf.search_field = "TI" diff --git a/spec/helpers/single_search_helper_spec.rb b/spec/helpers/single_search_helper_spec.rb index 695cc2f56..c582eda64 100644 --- a/spec/helpers/single_search_helper_spec.rb +++ b/spec/helpers/single_search_helper_spec.rb @@ -112,17 +112,17 @@ end it "returns a link to the EDS keyword search results page" do - expect(helper.bento_all_results_link("ebsco_eds_keyword")).to eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test&bquery=hello") + expect(helper.bento_all_results_link("ebsco_eds_keyword")).to eq("https://research.ebsco.com/c/ciw6tp/search/results?q=hello&limiters=FT1%253AY&searchMode=all&searchSegment=all-results") end it "returns a link to the EDS title search results page" do - expect(helper.bento_all_results_link("ebsco_eds_title")).to eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test&bquery=TI+hello") + expect(helper.bento_all_results_link("ebsco_eds_title")).to eq("https://publications.ebsco.com/c/elukgh?searchField=titlename&searchtype=contains&highlightTag=mark&search=hello") end end context "when a query is not present" do it "returns a link to the catalogue search results page" do - expect(helper.bento_all_results_link("catalogue")).to eq("http://test.host/catalog?search_field=all_fields&q=") + expect(helper.bento_all_results_link("catalogue")).to eq("http://test.host/catalog?search_field=all_fields&q=") # eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test?q=hello&limiters=FT1%253AY&searchMode=all&searchSegment=all-results") end it "returns a link to the finding aids search results page" do @@ -130,11 +130,11 @@ end it "returns a link to the EDS keyword search results page" do - expect(helper.bento_all_results_link("ebsco_eds_keyword")).to eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test") + expect(helper.bento_all_results_link("ebsco_eds_keyword")).to eq("https://research.ebsco.com/c/ciw6tp/search/results") end it "returns a link to the EDS title search results page" do - expect(helper.bento_all_results_link("ebsco_eds_title")).to eq("https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true&custid=test") + expect(helper.bento_all_results_link("ebsco_eds_title")).to eq("https://publications.ebsco.com/c/elukgh") end end end