Skip to content

Commit

Permalink
detailed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-spike committed Jan 9, 2025
1 parent c808059 commit 0e92926
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion prism-image-search/tests/e2e/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ def test_search(browser, app_url):
results_div = browser.find_element(By.ID, 'results')
assert results_div.is_displayed(), "Results div is not displayed"

# Find all elements within the gallery
# Find all elements within the search resultsgallery
gallery_items = results_div.find_elements(By.CSS_SELECTOR, ".responsive .gallery .search-result")

# Assert there are exactly 1 elements
# This assumes that the app was started without adding any additional images to the data file
# By default, there is 1 image in the data file
assert len(gallery_items) == 1, f"Expected 1 elements in the gallery, but found {len(gallery_items)}."
3 changes: 2 additions & 1 deletion quote-semantic-search/tests/e2e/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ def test_search(browser, app_url):
results_div = browser.find_element(By.ID, 'results')
assert results_div.is_displayed(), "Results div is not displayed"

# Find all elements within the gallery
# Find all elements within the results gallery
gallery_items = results_div.find_elements(By.CSS_SELECTOR, ".gallery .responsive .quote")

# Assert there are exactly 5 elements
# By default the app returns 5 quotes
assert len(gallery_items) == 5, f"Expected 5 elements in the gallery, but found {len(gallery_items)}."

0 comments on commit 0e92926

Please sign in to comment.