mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix copy to container test (ddbe627)
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user