diff --git a/src/bonsai/test/bim/feature/spatial.feature b/src/bonsai/test/bim/feature/spatial.feature index 604159f002..64dbbd2f12 100644 --- a/src/bonsai/test/bim/feature/spatial.feature +++ b/src/bonsai/test/bim/feature/spatial.feature @@ -103,8 +103,7 @@ Scenario: Select similar container Scenario: Execute generate space from cursor position Given an empty IFC project - When I press "bim.generate_space" - Then nothing happens + Then I press "bim.generate_space" and expect error "Error: Couldn't find any polygons to form the space shape. Perhaps, RL value need to be adjusted." Scenario: Execute generate spaces from walls Given an empty IFC project @@ -133,6 +132,11 @@ Scenario: Spatial decomposition - see panel Scenario: Isolate spatial container Given an empty IFC project + And I trigger "Add Element" + And I set the "Definition" property to "IfcElement" + And I set the "Class" property to "IfcFurniture" + And I set the "Representation" property to "No Geometry" + And I click "OK" And I look at the "Spatial Decomposition" panel When I select the "My Site" item in the "BIM_UL_containers_manager" list And I click "Isolate" @@ -140,6 +144,11 @@ Scenario: Isolate spatial container Scenario: Show spatial container Given an empty IFC project + And I trigger "Add Element" + And I set the "Definition" property to "IfcElement" + And I set the "Class" property to "IfcFurniture" + And I set the "Representation" property to "No Geometry" + And I click "OK" And I look at the "Spatial Decomposition" panel When I select the "My Site" item in the "BIM_UL_containers_manager" list And I click "HIDE_OFF" @@ -147,6 +156,11 @@ Scenario: Show spatial container Scenario: Hide spatial container Given an empty IFC project + And I trigger "Add Element" + And I set the "Definition" property to "IfcElement" + And I set the "Class" property to "IfcFurniture" + And I set the "Representation" property to "No Geometry" + And I click "OK" And I look at the "Spatial Decomposition" panel When I select the "My Site" item in the "BIM_UL_containers_manager" list And I click "HIDE_ON" diff --git a/src/bonsai/test/bim/feature/style.feature b/src/bonsai/test/bim/feature/style.feature index 7e4c70b35f..68912ace0a 100644 --- a/src/bonsai/test/bim/feature/style.feature +++ b/src/bonsai/test/bim/feature/style.feature @@ -49,14 +49,15 @@ Scenario: Remove style Scenario: Edit style Given an empty IFC project - And I press "bim.load_styles(style_type='IfcSurfaceStyle')" - And I press "bim.enable_adding_presentation_style" - And I set "scene.BIMStylesProperties.style_name" to "Style" - And I press "bim.add_presentation_style" + And I look at the "Styles" panel + And I click "IMPORT" + And I click "ADD" + And I set the "Name" property to "Style" + And I click "Save New Style" And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()" - And I press "bim.enable_editing_style(style={style})" - And I set "scene.BIMStylesProperties.attributes[0].string_value" to "NewStyle" - When I press "bim.edit_style" + And I click "GREASEPENCIL" + And I set the "Name" property to "NewStyle" + When I click "Save Attributes" Then the material "Style" does not exist And the material "NewStyle" exists diff --git a/src/bonsai/test/bim/test_feature.py b/src/bonsai/test/bim/test_feature.py index 4f263f93c9..9cc71bd4f5 100644 --- a/src/bonsai/test/bim/test_feature.py +++ b/src/bonsai/test/bim/test_feature.py @@ -566,8 +566,7 @@ def i_click_button(button): # Clicked confirm on an operator's draw dialog return i_press_operator(panel_spy.panel.bl_idname) debug = "\n".join([f"{i} {v}" for i, v in enumerate(panel_spy.spied_operators)]) - if not debug: - debug = f"No buttons were found, here is the text we see: {panel_spy.spied_labels}" + debug += f"\nHere is the text we see: {panel_spy.spied_labels}" assert False, f"Could not find {button}:\n{debug}"