From 2287931e9ca1d88c8a5251260bc94eb690337f28 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 4 Aug 2024 21:22:52 +1000 Subject: [PATCH] Rewrite georeference tests actually test UI effects --- .../test/bim/feature/georeference.feature | 64 ++++++++++++------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/src/blenderbim/test/bim/feature/georeference.feature b/src/blenderbim/test/bim/feature/georeference.feature index 815f303ab3..75e5f6b30c 100644 --- a/src/blenderbim/test/bim/feature/georeference.feature +++ b/src/blenderbim/test/bim/feature/georeference.feature @@ -3,46 +3,66 @@ Feature: Georeference Scenario: Add georeferencing Given an empty IFC project - When I press "bim.add_georeferencing" - Then nothing happens + And I look at the "Georeferencing" panel + And I see "Not Georeferenced" + And I don't see "Projected CRS" + When I click "ADD" + Then I see "Projected CRS" + And I see "EPSG:3857" Scenario: Enable editing georeferencing Given an empty IFC project - And I press "bim.add_georeferencing" - When I press "bim.enable_editing_georeferencing" - Then nothing happens + And I look at the "Georeferencing" panel + And I click "ADD" + When I click "GREASEPENCIL" + Then I see the "Name" property Scenario: Remove georeferencing Given an empty IFC project - And I press "bim.add_georeferencing" - When I press "bim.remove_georeferencing" - Then nothing happens + And I look at the "Georeferencing" panel + And I click "ADD" + When I click "X" + Then I see "Not Georeferenced" Scenario: Edit georeferencing Given an empty IFC project - And I press "bim.add_georeferencing" - And I press "bim.enable_editing_georeferencing" - When I press "bim.edit_georeferencing" - Then nothing happens + And I look at the "Georeferencing" panel + And I click "ADD" + And I click "GREASEPENCIL" + When I click "CHECKMARK" + Then I don't see the "Name" property + And I see "EPSG:3857" Scenario: Disable editing georeferencing Given an empty IFC project - And I press "bim.add_georeferencing" - And I press "bim.enable_editing_georeferencing" - When I press "bim.disable_editing_georeferencing" - Then nothing happens + And I look at the "Georeferencing" panel + And I click "ADD" + And I click "GREASEPENCIL" + When I click "CANCEL" + Then I don't see the "Name" property + And I see "EPSG:3857" Scenario: Get cursor location Given an empty IFC project - When I press "bim.get_cursor_location" - Then nothing happens + And I look at the "Georeferencing Calculator" panel + And I see the "Local (mm)" property is "0,0,0" + And I see the "Map (n/a)" property is "0,0,0" + When I click "TRACKER" + Then I see the "Local (mm)" property is "0.0,0.0,0.0" + And I see the "Map (n/a)" property is "0.0,0.0,0.0" Scenario: Convert local to map Given an empty IFC project - When I set "scene.BIMGeoreferenceProperties.local_coordinates" to "0,0,0" - Then "scene.BIMGeoreferenceProperties.map_coordinates" is "0.0,0.0,0.0" + And I look at the "Georeferencing Calculator" panel + And I see the "Map (n/a)" property is "0,0,0" + When I set the "Local (mm)" property to "0,0,0" + And I look at the "Georeferencing Calculator" panel + Then I see the "Map (n/a)" property is "0.0,0.0,0.0" Scenario: Convert map to local Given an empty IFC project - When I set "scene.BIMGeoreferenceProperties.map_coordinates" to "0,0,0" - Then "scene.BIMGeoreferenceProperties.local_coordinates" is "0.0,0.0,0.0" + And I look at the "Georeferencing Calculator" panel + And I see the "Local (mm)" property is "0,0,0" + When I set the "Map (n/a)" property to "0,0,0" + And I look at the "Georeferencing Calculator" panel + Then I see the "Local (mm)" property is "0.0,0.0,0.0"