Skip to content

Commit

Permalink
add comments to explain federation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilelkihal committed Jan 30, 2025
1 parent 11360ee commit 798119b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/system/federation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ class FederationTest < ApplicationSystemTestCase
setup do
@search_path = "/search"
@query = "test"

@ontologies_path = "/ontologies"

end

test "perform federated search in search page and make sure federation is working" do
Expand All @@ -30,7 +28,7 @@ class FederationTest < ApplicationSystemTestCase
test "perform federated browse and make sure federation is working" do
###### Federation non activated
visit "#{@ontologies_path}"
loop do
loop do # make sure page is not still loading
loading_element = find_all(".browse-sket").any?
break unless loading_element
page.execute_script("window.scrollBy(0, window.innerHeight)")
Expand All @@ -39,7 +37,7 @@ class FederationTest < ApplicationSystemTestCase
results_count_no_federation = first('.browse-desc-text').text.scan(/\d+/).first.to_i

find("[data-target='#browse-categories-filter']").click
loop do
loop do # make sure page is not still loading
loading_element = find_all(".browse-sket").any?
break unless loading_element
end
Expand All @@ -51,8 +49,8 @@ class FederationTest < ApplicationSystemTestCase

visit "#{@ontologies_path}?sort_by=ontology_name&portals=agroportal"

# Scroll all down to display all the results
loop do

loop do # Scroll all down to display all the results
loading_element = find_all(".browse-sket").any?

break unless loading_element
Expand Down

0 comments on commit 798119b

Please sign in to comment.