Skip to content

Commit

Permalink
test if xpath works at all in this case
Browse files Browse the repository at this point in the history
  • Loading branch information
evemartin committed Aug 30, 2024
1 parent 3ca336a commit 327a27e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions game/end_to_end_tests/test_level_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,22 +307,18 @@ def test_pigeon(self):
)
assert len(scenery_cow) == 1
cow_link = scenery_cow[0].get_attribute("href")
assert cow_link == "this will fail I just want to see what the link is"
assert cow_link == "/static/game/raphael_image/Clarice.svg"


cow = self.selenium.find_elements(By.XPATH, "//image[contains(@href, 'Clarice')]")
cow = self.selenium.find_elements(By.XPATH, "//image[@href='/static/game/raphael_image/Clarice.svg']")
assert len(cow) == 1

Select(self.selenium.find_element(By.ID, "theme_select")).select_by_value(
"city"
)

# assert WebDriverWait(self.selenium, DELAY_TIME).until(
# EC.presence_of_element_located((By.XPATH, "//image[contains(@href, 'pigeon')]"))
# )

# pigeon = self.selenium.find_elements(By.XPATH, "//image[contains(@href, 'pigeon')]")
# nonexistent_cow = self.selenium.find_elements(By.XPATH, "//image[contains(@href, 'Clarice')]")
# pigeon = self.selenium.find_elements(By.XPATH, "//image[@href='/static/game/raphael_image/pigeon.svg']")
# nonexistent_cow = self.selenium.find_elements(By.XPATH, "//image[@href='/static/game/raphael_image/Clarice.svg']")

# assert len(pigeon) == 1
# assert len(nonexistent_cow) == 0

0 comments on commit 327a27e

Please sign in to comment.