Fix copy to container test (ddbe627)

This commit is contained in:
Andrej730
2025-11-11 18:55:17 +05:00
parent e8bcbc83a4
commit 821b5380ea
3 changed files with 8 additions and 6 deletions
@@ -234,7 +234,7 @@ class RemoveContainer(bpy.types.Operator, tool.Ifc.Operator):
class CopyToContainer(bpy.types.Operator, tool.Ifc.Operator):
"""
Copies selected 3D elements in the viewport to the selected spatial containers
Copies selected 3D elements in the viewport to the container selected in Spatial Manager.
Example: bulk copy a wall to multiple storeys
@@ -243,7 +243,7 @@ class CopyToContainer(bpy.types.Operator, tool.Ifc.Operator):
Copying containers to other containers currently is not supported."""
bl_idname = "bim.copy_to_container"
bl_label = "Copy To Container"
bl_label = "Copy to Container"
bl_options = {"REGISTER", "UNDO"}
container: bpy.props.IntProperty() # pyright: ignore[reportRedeclaration]
+4 -4
View File
@@ -82,10 +82,10 @@ Scenario: Copy to container
And I set the "Products" property to "IfcElement"
And I set the "Class" property to "IfcWall"
And I click "Assign IFC Class"
And the object "IfcSite/My Site" is selected
And additionally the object "IfcWall/Cube" is selected
And I press "bim.enable_editing_container"
When I press "bim.copy_to_container"
And I look at the "Spatial Decomposition" panel
When I select the "My Site" item in the "BIM_UL_containers_manager" list
And the object "IfcWall/Cube" is selected
When I click "MOD_DISPLACE"
Then the object "IfcWall/Cube.001" is in the collection "IfcSite/My Site"
Scenario: Reference structure
+2
View File
@@ -792,6 +792,8 @@ def i_press_operator_and_expect_error(operator, error_msg):
assert False, f"Operator bpy.ops.{operator} ran without exception '{error_msg}'"
# TODO: We should rename 'I press' to 'I run' or 'I execute'
# to avoid confusion with 'I click'.
@given(parsers.parse('I press "{operator}"'))
@when(parsers.parse('I press "{operator}"'))
def i_press_operator(operator: str) -> types.NoneType: