Skip to content

Commit

Permalink
peforme federated search in search page and make sure federation is w…
Browse files Browse the repository at this point in the history
…orking
  • Loading branch information
Bilelkihal committed Jan 30, 2025
1 parent 03f4ade commit 79e7b0b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/system/federation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ class FederationTest < ApplicationSystemTestCase

end

test "perform federated search in search page and make sure duplicates are managed correctly" do
test "perform federated search in search page and make sure federation is working" do

visit "#{@search_path}?q=#{@query}"
results_count_no_federation = find('.search-page-number-of-results').text.scan(/\d+/).first.to_i

visit "#{@search_path}?q=#{@query}&lang=all&portals%5B%5D=agroportal&portals%5B%5D=ecoportal&portals%5B%5D=earthportal&portals%5B%5D=biodivportal"
assert_selector ".search-page-number-of-results"
results_count_federation = find('.search-page-number-of-results').text.scan(/\d+/).first.to_i

assert_not_equal results_count_no_federation, results_count_federation

results_titles = all("a.title div").map { |div| div.text.strip }

Expand Down

0 comments on commit 79e7b0b

Please sign in to comment.