Skip to content

Commit

Permalink
debug test
Browse files Browse the repository at this point in the history
  • Loading branch information
evemartin committed May 13, 2024
1 parent 9d3e77d commit 65f5b85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions game/end_to_end_tests/test_level_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_multiple_houses(self):
page = self.go_to_level_editor()
add_road_button = self.selenium.find_element(By.ID, "add_road")
add_road_button.click()
action.move_to_element(add_road_button).move_by_offset(600, 0).click_and_hold().move_by_offset(300, 0).click()
action.move_to_element(add_road_button).move_by_offset(600, 0).click_and_hold().move_by_offset(300, 0).click().perform()

grid_paper = self.selenium.find_element(By.ID, "paper")

Expand All @@ -35,15 +35,15 @@ def test_multiple_houses(self):

add_house_button = self.selenium.find_element(By.ID, "add_house")
add_house_button.click()
action.move_to_element(add_road_button).move_by_offset(600, 0).click()
action.move_to_element(add_road_button).move_by_offset(800, 0).click()
action.move_to_element(add_road_button).move_by_offset(600, 0).click().perform()
action.move_to_element(add_road_button).move_by_offset(800, 0).click().perform()

added_houses = grid_paper.find_elements(By.XPATH, ".//svg/rect[fill='#0000ff']")
assert len(added_houses) == 2

delete_house_button = self.selenium.find_element(By.ID, "delete_house")
delete_house_button.click()
action.move_to_element(delete_house_button).move_by_offset(600, 0).click()
action.move_to_element(delete_house_button).move_by_offset(600, 0).click().perform()

houses_after_delete = grid_paper.find_elements(By.XPATH, ".//svg/rect[fill='#0000ff']")
assert len(houses_after_delete) == 1

0 comments on commit 65f5b85

Please sign in to comment.