From 58142104924d4bf40d04c2932704888b6e48bac0 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 09:58:38 +0000 Subject: [PATCH 01/25] fix: forbid cows from origin and house spaces --- game/end_to_end_tests/test_level_editor.py | 49 ++++++++++++++++++---- game/static/game/js/level_editor.js | 2 +- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 43d5f32a7..69df9ba4e 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -6,6 +6,24 @@ class TestLevelEditor(BaseGameTest): + def set_up_basic_map(self): + add_road_button = self.selenium.find_element(By.ID, "add_road") + add_road_button.click() + + road_start = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='130'][y='530']") + road_end = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='330'][y='530']") + ActionChains(self.selenium).drag_and_drop(road_start, road_end).perform() + + mark_start_button = self.selenium.find_element(By.ID, "start") + mark_start_button.click() + ActionChains(self.selenium).move_to_element(road_start).click().perform() + + add_house_button = self.selenium.find_element(By.ID, "add_house") + add_house_button.click() + ActionChains(self.selenium).move_to_element(road_end).click().perform() + + return [road_start, road_end] + def test_level_editor_displays(self): page = self.go_to_level_editor() @@ -22,25 +40,40 @@ def test_code_tab_blocks_load(self): assert page.element_exists_by_id(f"{block_type}_image") def test_multiple_houses(self): - add_road_button = self.selenium.find_element(By.ID, "add_road") - add_road_button.click() + [road_start, road_end] = self.set_up_basic_map() - road_start = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='130'][y='530']") - road_end = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='330'][y='530']") - ActionChains(self.selenium).drag_and_drop(road_start, road_end).perform() + road_middle = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='230'][y='530']") add_house_button = self.selenium.find_element(By.ID, "add_house") add_house_button.click() - ActionChains(self.selenium).move_to_element(road_start).click().perform() - ActionChains(self.selenium).move_to_element(road_end).click().perform() + ActionChains(self.selenium).move_to_element(road_middle).click().perform() added_houses = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") assert len(added_houses) == 2 delete_house_button = self.selenium.find_element(By.ID, "delete_house") delete_house_button.click() - ActionChains(self.selenium).move_to_element(road_end).click().perform() + ActionChains(self.selenium).move_to_element(road_middle).click().perform() ActionChains(self.selenium).move_to_element(road_start).perform() houses_after_delete = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") assert len(houses_after_delete) == 1 + + def test_cow_on_endpoints(self): + [road_start, road_end] = self.set_up_basic_map() + + scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") + scenery_tab.click() + + cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") + cow.click() + + draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_start).perform() + forbidden_start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") + assert len(forbidden_start_space) == 1 + + ActionChains(self.selenium).move_to_element(road_end).perform() + forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") + assert len(forbidden_end_space) == 1 + diff --git a/game/static/game/js/level_editor.js b/game/static/game/js/level_editor.js index c5fed2189..78e250cd9 100644 --- a/game/static/game/js/level_editor.js +++ b/game/static/game/js/level_editor.js @@ -1694,7 +1694,7 @@ ocargo.LevelEditor = function(levelId) { function isValidPlacement(controlledCoord){ var controlledNode = ocargo.Node.findNodeByCoordinate(controlledCoord, nodes); - if (!controlledNode) + if (!controlledNode || isOriginCoordinate(controlledCoord) || isHouseCoordinate(controlledCoord)) return false; for (var i=0; i < cows.length; i++) { var otherCow = cows[i]; From 7b10c40f7393ec16385078565422aea81eaa79f7 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 10:06:24 +0000 Subject: [PATCH 02/25] debug test --- game/end_to_end_tests/test_level_editor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 69df9ba4e..9e3d4f48a 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -7,6 +7,8 @@ class TestLevelEditor(BaseGameTest): def set_up_basic_map(self): + self.test_level_editor_displays() + add_road_button = self.selenium.find_element(By.ID, "add_road") add_road_button.click() From 4c83b4fb4d9aa485d44fb7fbebb378bd5edc3074 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 10:10:54 +0000 Subject: [PATCH 03/25] debug test --- game/end_to_end_tests/test_level_editor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 9e3d4f48a..79a7b3f4f 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -8,7 +8,7 @@ class TestLevelEditor(BaseGameTest): def set_up_basic_map(self): self.test_level_editor_displays() - + add_road_button = self.selenium.find_element(By.ID, "add_road") add_road_button.click() @@ -75,7 +75,7 @@ def test_cow_on_endpoints(self): forbidden_start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") assert len(forbidden_start_space) == 1 - ActionChains(self.selenium).move_to_element(road_end).perform() + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") assert len(forbidden_end_space) == 1 From e9582e2f67bd8e33fc8be52c58eff79338f13768 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 10:19:41 +0000 Subject: [PATCH 04/25] debug test --- game/end_to_end_tests/test_level_editor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 79a7b3f4f..b1f7222db 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -75,6 +75,7 @@ def test_cow_on_endpoints(self): forbidden_start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") assert len(forbidden_start_space) == 1 + ActionChains(self.selenium).release().perform() ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") assert len(forbidden_end_space) == 1 From 1f97a1706ca626e49d7fa543df36c53996b832dd Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 10:24:54 +0000 Subject: [PATCH 05/25] test out change to 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 b1f7222db..5abaf0dfa 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -71,12 +71,11 @@ def test_cow_on_endpoints(self): cow.click() draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_start).perform() - forbidden_start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") - assert len(forbidden_start_space) == 1 - - ActionChains(self.selenium).release().perform() ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") assert len(forbidden_end_space) == 1 + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_start).perform() + forbidden_start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") + assert len(forbidden_start_space) == 1 + From 16e786c66d4af7f337ed79a7f552e68533ef0949 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 10:33:11 +0000 Subject: [PATCH 06/25] test splitting the tests --- game/end_to_end_tests/test_level_editor.py | 20 +++++++++++++++----- 1 file changed, 15 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 5abaf0dfa..f3cee9418 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -61,7 +61,7 @@ def test_multiple_houses(self): houses_after_delete = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") assert len(houses_after_delete) == 1 - def test_cow_on_endpoints(self): + def test_cow_on_origin(self): [road_start, road_end] = self.set_up_basic_map() scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") @@ -71,11 +71,21 @@ def test_cow_on_endpoints(self): cow.click() draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() - forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") - assert len(forbidden_end_space) == 1 - ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_start).perform() forbidden_start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") assert len(forbidden_start_space) == 1 + + def test_cow_on_house(self): + [road_start, road_end] = self.set_up_basic_map() + + scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") + scenery_tab.click() + + cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") + cow.click() + + draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() + forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") + assert len(forbidden_end_space) == 1 From 942724c9289bed968d2c10b6964ec938f06bd314 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 10:45:01 +0000 Subject: [PATCH 07/25] test the test --- game/end_to_end_tests/test_level_editor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index f3cee9418..05be68cd3 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -86,6 +86,8 @@ def test_cow_on_house(self): draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() - forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") + forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7']") + end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") + assert len(end_space) == 0 assert len(forbidden_end_space) == 1 From 3a98aa52cde13d3bc82901ecddc78de066d6842f Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 10:50:06 +0000 Subject: [PATCH 08/25] test change to house test --- game/end_to_end_tests/test_level_editor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 05be68cd3..d0ce3d642 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -78,6 +78,8 @@ def test_cow_on_origin(self): def test_cow_on_house(self): [road_start, road_end] = self.set_up_basic_map() + house_space = self.selenium.find_element(By.CSS_SELECTOR, "rect[fill='#0000ff']") + scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") scenery_tab.click() @@ -85,9 +87,7 @@ def test_cow_on_house(self): cow.click() draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(house_space).perform() forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7']") - end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") - assert len(end_space) == 0 assert len(forbidden_end_space) == 1 From c25da0ffe13ed1c960f96df401e8910ed16dcf78 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 10:56:53 +0000 Subject: [PATCH 09/25] add log line for debugging --- game/end_to_end_tests/test_level_editor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index d0ce3d642..a75153931 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -78,8 +78,6 @@ def test_cow_on_origin(self): def test_cow_on_house(self): [road_start, road_end] = self.set_up_basic_map() - house_space = self.selenium.find_element(By.CSS_SELECTOR, "rect[fill='#0000ff']") - scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") scenery_tab.click() @@ -87,7 +85,9 @@ def test_cow_on_house(self): cow.click() draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(house_space).perform() + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() + boxes = self.selenium.find_elements(By.CSS_SELECTOR, "rect") + print(boxes) forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7']") assert len(forbidden_end_space) == 1 From 6f1a0fc209d8752af025df098f8bccabde3fc190 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 11:01:58 +0000 Subject: [PATCH 10/25] debug test --- game/end_to_end_tests/test_level_editor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index a75153931..a911e065b 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -87,7 +87,8 @@ def test_cow_on_house(self): draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() boxes = self.selenium.find_elements(By.CSS_SELECTOR, "rect") - print(boxes) + for box in boxes: + print(box) forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7']") assert len(forbidden_end_space) == 1 From f7eaa5807f3cbbc46c9736dd76e76fb52861ad35 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 11:06:15 +0000 Subject: [PATCH 11/25] debug test --- game/end_to_end_tests/test_level_editor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index a911e065b..b115f9bfd 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -88,7 +88,9 @@ def test_cow_on_house(self): ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() boxes = self.selenium.find_elements(By.CSS_SELECTOR, "rect") for box in boxes: - print(box) + print(box.get_attribute("x")) + print(box.get_attribute("y")) + print(box.get_attribute("fill")) forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7']") assert len(forbidden_end_space) == 1 From 89d92529db0d6bc0e71454a50e7b978cedea6a1e Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 11:11:26 +0000 Subject: [PATCH 12/25] debug test --- game/end_to_end_tests/test_level_editor.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index b115f9bfd..5187b0946 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -76,7 +76,20 @@ def test_cow_on_origin(self): assert len(forbidden_start_space) == 1 def test_cow_on_house(self): - [road_start, road_end] = self.set_up_basic_map() + add_road_button = self.selenium.find_element(By.ID, "add_road") + add_road_button.click() + + road_start = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='130'][y='530']") + road_end = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='330'][y='530']") + ActionChains(self.selenium).drag_and_drop(road_start, road_end).perform() + + mark_start_button = self.selenium.find_element(By.ID, "start") + mark_start_button.click() + ActionChains(self.selenium).move_to_element(road_start).click().perform() + + add_house_button = self.selenium.find_element(By.ID, "add_house") + add_house_button.click() + ActionChains(self.selenium).move_to_element(road_end).click().perform() scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") scenery_tab.click() @@ -91,6 +104,6 @@ def test_cow_on_house(self): print(box.get_attribute("x")) print(box.get_attribute("y")) print(box.get_attribute("fill")) - forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7']") + forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330][y='530']") assert len(forbidden_end_space) == 1 From 09a24760738534a9cabfc2fccebaad9552a85fc4 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 11:19:16 +0000 Subject: [PATCH 13/25] debug test --- game/end_to_end_tests/test_level_editor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 5187b0946..ad6953591 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -77,6 +77,7 @@ def test_cow_on_origin(self): def test_cow_on_house(self): add_road_button = self.selenium.find_element(By.ID, "add_road") + self.wait_for_element_to_be_clickable(add_road_button, wait_seconds=15) add_road_button.click() road_start = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='130'][y='530']") From a9a8e7e0bfcf763c65af23f737df2e450a7fa35b Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 11:23:28 +0000 Subject: [PATCH 14/25] remove test to see if others work --- game/end_to_end_tests/test_level_editor.py | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index ad6953591..80be2431a 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -75,36 +75,36 @@ def test_cow_on_origin(self): forbidden_start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") assert len(forbidden_start_space) == 1 - def test_cow_on_house(self): - add_road_button = self.selenium.find_element(By.ID, "add_road") - self.wait_for_element_to_be_clickable(add_road_button, wait_seconds=15) - add_road_button.click() - - road_start = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='130'][y='530']") - road_end = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='330'][y='530']") - ActionChains(self.selenium).drag_and_drop(road_start, road_end).perform() - - mark_start_button = self.selenium.find_element(By.ID, "start") - mark_start_button.click() - ActionChains(self.selenium).move_to_element(road_start).click().perform() - - add_house_button = self.selenium.find_element(By.ID, "add_house") - add_house_button.click() - ActionChains(self.selenium).move_to_element(road_end).click().perform() - - scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") - scenery_tab.click() - - cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") - cow.click() - - draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() - boxes = self.selenium.find_elements(By.CSS_SELECTOR, "rect") - for box in boxes: - print(box.get_attribute("x")) - print(box.get_attribute("y")) - print(box.get_attribute("fill")) - forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330][y='530']") - assert len(forbidden_end_space) == 1 + # def test_cow_on_house(self): + # add_road_button = self.selenium.find_element(By.ID, "add_road") + # self.wait_for_element_to_be_clickable(add_road_button, wait_seconds=15) + # add_road_button.click() + + # road_start = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='130'][y='530']") + # road_end = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='330'][y='530']") + # ActionChains(self.selenium).drag_and_drop(road_start, road_end).perform() + + # mark_start_button = self.selenium.find_element(By.ID, "start") + # mark_start_button.click() + # ActionChains(self.selenium).move_to_element(road_start).click().perform() + + # add_house_button = self.selenium.find_element(By.ID, "add_house") + # add_house_button.click() + # ActionChains(self.selenium).move_to_element(road_end).click().perform() + + # scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") + # scenery_tab.click() + + # cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") + # cow.click() + + # draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") + # ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() + # boxes = self.selenium.find_elements(By.CSS_SELECTOR, "rect") + # for box in boxes: + # print(box.get_attribute("x")) + # print(box.get_attribute("y")) + # print(box.get_attribute("fill")) + # forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") + # assert len(forbidden_end_space) == 1 From 225deaff285f2b683537c9339be757469ac50c6f Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 12:24:11 +0000 Subject: [PATCH 15/25] debug test --- game/end_to_end_tests/test_level_editor.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 80be2431a..5d864c8aa 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -6,7 +6,7 @@ class TestLevelEditor(BaseGameTest): - def set_up_basic_map(self): + def test_set_up_basic_map(self): self.test_level_editor_displays() add_road_button = self.selenium.find_element(By.ID, "add_road") @@ -19,10 +19,14 @@ def set_up_basic_map(self): mark_start_button = self.selenium.find_element(By.ID, "start") mark_start_button.click() ActionChains(self.selenium).move_to_element(road_start).click().perform() + start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#ff0000']") + assert len(start_space) == 1 add_house_button = self.selenium.find_element(By.ID, "add_house") add_house_button.click() ActionChains(self.selenium).move_to_element(road_end).click().perform() + house_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") + assert len(house_space) == 1 return [road_start, road_end] @@ -42,7 +46,7 @@ def test_code_tab_blocks_load(self): assert page.element_exists_by_id(f"{block_type}_image") def test_multiple_houses(self): - [road_start, road_end] = self.set_up_basic_map() + [road_start, road_end] = self.test_set_up_basic_map() road_middle = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='230'][y='530']") @@ -62,7 +66,7 @@ def test_multiple_houses(self): assert len(houses_after_delete) == 1 def test_cow_on_origin(self): - [road_start, road_end] = self.set_up_basic_map() + [road_start, road_end] = self.test_set_up_basic_map() scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") scenery_tab.click() @@ -75,6 +79,12 @@ def test_cow_on_origin(self): forbidden_start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") assert len(forbidden_start_space) == 1 + def test_cow_on_house(self): + [road_start, road_end] = self.test_set_up_basic_map() + + house_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") + assert len(house_space) == 1 + # def test_cow_on_house(self): # add_road_button = self.selenium.find_element(By.ID, "add_road") # self.wait_for_element_to_be_clickable(add_road_button, wait_seconds=15) From 372c5b177809bde5219a74e6820cbb3b115d7553 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 12:31:51 +0000 Subject: [PATCH 16/25] add back test code --- game/end_to_end_tests/test_level_editor.py | 55 +++++++--------------- 1 file changed, 16 insertions(+), 39 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 5d864c8aa..5c79f1221 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -6,7 +6,7 @@ class TestLevelEditor(BaseGameTest): - def test_set_up_basic_map(self): + def set_up_basic_map(self): self.test_level_editor_displays() add_road_button = self.selenium.find_element(By.ID, "add_road") @@ -19,14 +19,10 @@ def test_set_up_basic_map(self): mark_start_button = self.selenium.find_element(By.ID, "start") mark_start_button.click() ActionChains(self.selenium).move_to_element(road_start).click().perform() - start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#ff0000']") - assert len(start_space) == 1 add_house_button = self.selenium.find_element(By.ID, "add_house") add_house_button.click() ActionChains(self.selenium).move_to_element(road_end).click().perform() - house_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") - assert len(house_space) == 1 return [road_start, road_end] @@ -46,7 +42,7 @@ def test_code_tab_blocks_load(self): assert page.element_exists_by_id(f"{block_type}_image") def test_multiple_houses(self): - [road_start, road_end] = self.test_set_up_basic_map() + [road_start, road_end] = self.set_up_basic_map() road_middle = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='230'][y='530']") @@ -66,7 +62,10 @@ def test_multiple_houses(self): assert len(houses_after_delete) == 1 def test_cow_on_origin(self): - [road_start, road_end] = self.test_set_up_basic_map() + [road_start, road_end] = self.set_up_basic_map() + + house_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#ff0000']") + assert len(house_space) == 1 scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") scenery_tab.click() @@ -85,36 +84,14 @@ def test_cow_on_house(self): house_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") assert len(house_space) == 1 - # def test_cow_on_house(self): - # add_road_button = self.selenium.find_element(By.ID, "add_road") - # self.wait_for_element_to_be_clickable(add_road_button, wait_seconds=15) - # add_road_button.click() - - # road_start = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='130'][y='530']") - # road_end = self.selenium.find_element(By.CSS_SELECTOR, "rect[x='330'][y='530']") - # ActionChains(self.selenium).drag_and_drop(road_start, road_end).perform() - - # mark_start_button = self.selenium.find_element(By.ID, "start") - # mark_start_button.click() - # ActionChains(self.selenium).move_to_element(road_start).click().perform() - - # add_house_button = self.selenium.find_element(By.ID, "add_house") - # add_house_button.click() - # ActionChains(self.selenium).move_to_element(road_end).click().perform() - - # scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") - # scenery_tab.click() - - # cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") - # cow.click() - - # draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - # ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() - # boxes = self.selenium.find_elements(By.CSS_SELECTOR, "rect") - # for box in boxes: - # print(box.get_attribute("x")) - # print(box.get_attribute("y")) - # print(box.get_attribute("fill")) - # forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") - # assert len(forbidden_end_space) == 1 + scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") + scenery_tab.click() + + cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") + cow.click() + + draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() + forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") + assert len(forbidden_end_space) == 1 From 7cac7175384089d9f44fd5c974b87efd9edc9e53 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 12:35:48 +0000 Subject: [PATCH 17/25] fix typo --- game/end_to_end_tests/test_level_editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 5c79f1221..d85a3497d 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -79,7 +79,7 @@ def test_cow_on_origin(self): assert len(forbidden_start_space) == 1 def test_cow_on_house(self): - [road_start, road_end] = self.test_set_up_basic_map() + [road_start, road_end] = self.set_up_basic_map() house_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") assert len(house_space) == 1 From 7437674630f8f73591efd7d999b8ea6f145caf50 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 12:40:20 +0000 Subject: [PATCH 18/25] debug test --- game/end_to_end_tests/test_level_editor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index d85a3497d..041c1b235 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -83,6 +83,7 @@ def test_cow_on_house(self): house_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff']") assert len(house_space) == 1 + assert road_end == house_space[0] scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") scenery_tab.click() @@ -90,8 +91,8 @@ def test_cow_on_house(self): cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") cow.click() - draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() - forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") - assert len(forbidden_end_space) == 1 + # draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") + # ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() + # forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") + # assert len(forbidden_end_space) == 1 From 63fa58b03aff21de0142d67c8bd64276a7f01688 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 13:15:55 +0000 Subject: [PATCH 19/25] debug test --- game/end_to_end_tests/test_level_editor.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 041c1b235..fd8f689b3 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -91,8 +91,11 @@ def test_cow_on_house(self): cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") cow.click() - # draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - # ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() + draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() + forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[x='330'][y='530']") + print(forbidden_end_space[0].get_attribute("fill")) + # forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") # assert len(forbidden_end_space) == 1 From 5def62c2953bac1bfbcc0369b2b4fce01e79c03d Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 13:23:58 +0000 Subject: [PATCH 20/25] debug test --- game/end_to_end_tests/test_level_editor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index fd8f689b3..c67d27f19 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -93,8 +93,7 @@ def test_cow_on_house(self): draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() - forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[x='330'][y='530']") - print(forbidden_end_space[0].get_attribute("fill")) + forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff'][x='330'][y='530']") # forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") # assert len(forbidden_end_space) == 1 From bc591df76b8b2b78291a1a51b4a342d1ed000dd2 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 13:25:07 +0000 Subject: [PATCH 21/25] debug test --- game/end_to_end_tests/test_level_editor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index c67d27f19..34f3adef3 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -94,6 +94,7 @@ def test_cow_on_house(self): draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff'][x='330'][y='530']") + assert len(forbidden_end_space) == 1 # forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") # assert len(forbidden_end_space) == 1 From 63af3154a9e6cb31e91ba26c8e257c15bcaa1eb4 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 14:08:00 +0000 Subject: [PATCH 22/25] test move with offset --- game/end_to_end_tests/test_level_editor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index 34f3adef3..50f5a2b72 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -92,8 +92,8 @@ def test_cow_on_house(self): cow.click() draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() - forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#0000ff'][x='330'][y='530']") + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element_with_offset(road_end, -25, -25).perform() + forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][x='330'][y='530']") assert len(forbidden_end_space) == 1 # forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") From afe79d6cfd9e7e899405cc9308d9c004ae261def Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 14:17:57 +0000 Subject: [PATCH 23/25] test out slight adjustment --- game/end_to_end_tests/test_level_editor.py | 7 ++----- 1 file changed, 2 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 50f5a2b72..e3324fb35 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -93,9 +93,6 @@ def test_cow_on_house(self): draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element_with_offset(road_end, -25, -25).perform() - forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][x='330'][y='530']") - assert len(forbidden_end_space) == 1 - - # forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='330'][y='530']") - # assert len(forbidden_end_space) == 1 + forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#87e34d']") + assert len(forbidden_end_space) == 0 From ef1e053436a0e929077ce80429a178ec508a1a32 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Tue, 28 May 2024 14:26:01 +0000 Subject: [PATCH 24/25] tidy up --- game/end_to_end_tests/test_level_editor.py | 41 +++++++++++----------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index e3324fb35..eae240b4a 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -26,6 +26,17 @@ def set_up_basic_map(self): return [road_start, road_end] + def set_up_draggable_cow(self): + scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") + scenery_tab.click() + + cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") + cow.click() + + draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") + + return draggable_cow + def test_level_editor_displays(self): page = self.go_to_level_editor() @@ -64,19 +75,13 @@ def test_multiple_houses(self): def test_cow_on_origin(self): [road_start, road_end] = self.set_up_basic_map() - house_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#ff0000']") - assert len(house_space) == 1 - - scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") - scenery_tab.click() - - cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") - cow.click() + origin_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#ff0000']") + assert len(origin_space) == 1 - draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") + draggable_cow = self.set_up_draggable_cow() ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_start).perform() - forbidden_start_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") - assert len(forbidden_start_space) == 1 + start_space_warning = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#e35f4d'][fill-opacity='0.7'][x='130'][y='530']") + assert len(start_space_warning) == 1 def test_cow_on_house(self): [road_start, road_end] = self.set_up_basic_map() @@ -85,14 +90,8 @@ def test_cow_on_house(self): assert len(house_space) == 1 assert road_end == house_space[0] - scenery_tab = self.selenium.find_element(By.ID, "scenery_tab") - scenery_tab.click() - - cow = self.selenium.find_element(By.CSS_SELECTOR, "img[id='cow']") - cow.click() - - draggable_cow = self.selenium.find_element(By.CSS_SELECTOR, "image[x='0'][y='0']") - ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element_with_offset(road_end, -25, -25).perform() - forbidden_end_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#87e34d']") - assert len(forbidden_end_space) == 0 + draggable_cow = self.set_up_draggable_cow() + ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() + allowed_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#87e34d']") + assert len(allowed_space) == 0 From 0075151d0b5fe21fe9ce932bd53e06b185cbde0a Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Wed, 29 May 2024 08:48:43 +0000 Subject: [PATCH 25/25] address PR comments --- game/end_to_end_tests/test_level_editor.py | 1 - 1 file changed, 1 deletion(-) diff --git a/game/end_to_end_tests/test_level_editor.py b/game/end_to_end_tests/test_level_editor.py index eae240b4a..e2835766e 100644 --- a/game/end_to_end_tests/test_level_editor.py +++ b/game/end_to_end_tests/test_level_editor.py @@ -94,4 +94,3 @@ def test_cow_on_house(self): ActionChains(self.selenium).click_and_hold(draggable_cow).move_to_element(road_end).perform() allowed_space = self.selenium.find_elements(By.CSS_SELECTOR, "rect[fill='#87e34d']") assert len(allowed_space) == 0 -