From 7383f44f8f78c76c17fc96877a9bff2a5f763d3c Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 3 Mar 2023 18:22:47 +1100 Subject: [PATCH] See #2645. Update tests to use overridden built-ins. --- src/blenderbim/test/bim/feature/geometry.feature | 12 ++++++------ src/blenderbim/test/bim/feature/project.feature | 2 +- src/blenderbim/test/bim/test_feature.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/blenderbim/test/bim/feature/geometry.feature b/src/blenderbim/test/bim/feature/geometry.feature index 49bd1b548e..8f20dcc22d 100644 --- a/src/blenderbim/test/bim/feature/geometry.feature +++ b/src/blenderbim/test/bim/feature/geometry.feature @@ -285,7 +285,7 @@ Scenario: Override duplicate move - without active IFC data And I add an empty And the object "Cube" is selected And additionally the object "Empty" is selected - When I press "object.duplicate_move" + When I duplicate the selected objects Then the object "Cube" exists And the object "Cube.001" exists @@ -297,7 +297,7 @@ Scenario: Override duplicate move - with active IFC data And I press "bim.assign_class" And the object "IfcWall/Cube" is selected And additionally the object "IfcBuildingStorey/My Storey" is selected - When I press "object.duplicate_move" + When I duplicate the selected objects Then the object "IfcWall/Cube" exists And the object "IfcWall/Cube" is an "IfcWall" And the object "IfcWall/Cube.001" exists @@ -315,7 +315,7 @@ Scenario: Override duplicate move - copying a coloured representation And I press "bim.assign_class" And the object "IfcWall/Cube" is selected And the material "Material" colour is set to "1,0,0,1" - When I press "object.duplicate_move" + When I duplicate the selected objects And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" And an empty Blender session is started And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc')" @@ -335,7 +335,7 @@ Scenario: Override duplicate move - copying a type instance with a representatio And I set "scene.BIMModelProperties.relating_type_id" to "{cube}" And I press "bim.add_constr_type_instance" And the object "IfcWall/Wall" is selected - When I press "object.duplicate_move" + When I duplicate the selected objects Then the object "IfcWall/Wall.001" exists And the object "IfcWall/Wall.001" has a "MappedRepresentation" representation of "Model/Body/MODEL_VIEW" @@ -364,7 +364,7 @@ Scenario: Override duplicate move - copying a layered extrusion And the variable "type" is "{ifc}.by_type('IfcWallType')[0].id()" And I press "bim.assign_type(relating_type={type}, related_object='IfcWall/Cube')" And the object "IfcWall/Cube" is selected - When I press "object.duplicate_move" + When I duplicate the selected objects Then the object "IfcWall/Cube.001" exists Then the object "IfcWall/Cube.001" has a "SweptSolid" representation of "Model/Body/MODEL_VIEW" @@ -390,7 +390,7 @@ Scenario: Override duplicate move - copying a profiled extrusion And the variable "type" is "{ifc}.by_type('IfcWallType')[0].id()" And I press "bim.assign_type(relating_type={type}, related_object='IfcWall/Cube')" And the object "IfcWall/Cube" is selected - When I press "object.duplicate_move" + When I duplicate the selected objects Then the object "IfcWall/Cube.001" exists Then the object "IfcWall/Cube.001" has a "SweptSolid" representation of "Model/Body/MODEL_VIEW" diff --git a/src/blenderbim/test/bim/feature/project.feature b/src/blenderbim/test/bim/feature/project.feature index d7ea9d5849..1a1ab7f721 100644 --- a/src/blenderbim/test/bim/feature/project.feature +++ b/src/blenderbim/test/bim/feature/project.feature @@ -399,7 +399,7 @@ Scenario: Export IFC - with basic contents and saving as a relative path Scenario: Export IFC - with deleted objects synchronised Given an empty IFC project When the object "IfcBuildingStorey/My Storey" is selected - And I press "object.delete" + And I delete the selected objects And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" And an empty Blender session is started And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc')" diff --git a/src/blenderbim/test/bim/test_feature.py b/src/blenderbim/test/bim/test_feature.py index 858daf0f21..9a5bb6f2a4 100644 --- a/src/blenderbim/test/bim/test_feature.py +++ b/src/blenderbim/test/bim/test_feature.py @@ -182,7 +182,7 @@ def i_evaluate_expression(expression): @when("I duplicate the selected objects") def i_duplicate_the_selected_objects(): - bpy.ops.object.duplicate_move() + bpy.ops.bim.override_object_duplicate_move() blenderbim.bim.handler.active_object_callback() @@ -278,7 +278,7 @@ def i_am_on_frame_number(number): @when("I delete the selected objects") def i_delete_the_selected_objects(): - bpy.ops.object.delete() + bpy.ops.bim.override_object_delete() @given(parsers.parse('the variable "{key}" is "{value}"'))