From 808ed688397d1d899a1f772bb92ce5192854bd8a Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Mon, 13 May 2024 14:47:25 +0000 Subject: [PATCH] debug test --- game/end_to_end_tests/test_level_editor.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 6972348a1..a6ae009c3 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -26,20 +26,19 @@ def test_multiple_houses(self): 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() + 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() - added_houses = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") + added_houses = self.selenium.find_elements(By.XPATH, "//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() - houses_after_delete = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") + + houses_after_delete = self.selenium.find_elements(By.XPATH, "//rect[fill='#0000ff']") assert len(houses_after_delete) == 1