From 139627b6eca5149906c80dddfe691468544bd23b Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 30 Jul 2024 20:01:51 +0500 Subject: [PATCH] fix bim tests after b9f76042b --- .../test/bim/feature/geometry.feature | 6 +++--- .../test/bim/feature/project.feature | 20 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/blenderbim/test/bim/feature/geometry.feature b/src/blenderbim/test/bim/feature/geometry.feature index 6adf076219..c5f23f4819 100644 --- a/src/blenderbim/test/bim/feature/geometry.feature +++ b/src/blenderbim/test/bim/feature/geometry.feature @@ -93,7 +93,7 @@ Scenario: Switch representation - current edited representation is updated prior And I press "bim.switch_representation(ifc_definition_id={representation}, should_reload=True)" And the variable "representation" is "[r for r in {ifc}.by_type('IfcShapeRepresentation') if r.RepresentationType=='Annotation2D'][0].id()" And I press "bim.switch_representation(ifc_definition_id={representation}, should_reload=True)" - When I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" + When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')" Then the object "IfcWall/Cube" dimensions are "4,4,0" Scenario: Switch representation - current edited representation is discarded if switching to a box @@ -108,7 +108,7 @@ Scenario: Switch representation - current edited representation is discarded if And I press "bim.switch_representation(obj='IfcWall/Cube', ifc_definition_id={representation}, should_reload=True)" And the variable "representation" is "{ifc}.by_type('IfcShapeRepresentation')[0].id()" And I press "bim.switch_representation(obj='IfcWall/Cube', ifc_definition_id={representation}, should_reload=True)" - When I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" + When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')" Then the object "IfcWall/Cube" dimensions are "2,2,2" Scenario: Switch representation - existing Blender modifiers must be purged @@ -339,7 +339,7 @@ Scenario: Override duplicate move - copying a coloured representation And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()" And I press "bim.assign_style_to_selected(style_id={style})" When I duplicate the selected objects - And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" + And I press "bim.save_project(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', should_start_fresh_session=False)" Then the material "Style" colour is "1,0,0,1" diff --git a/src/blenderbim/test/bim/feature/project.feature b/src/blenderbim/test/bim/feature/project.feature index 3de459160d..11a3023340 100644 --- a/src/blenderbim/test/bim/feature/project.feature +++ b/src/blenderbim/test/bim/feature/project.feature @@ -833,31 +833,31 @@ Scenario: Unlink IFC Scenario: Export IFC - blank project Given an empty IFC project - When I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" + When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')" Then nothing happens Scenario: Export IFC - with basic contents Given an empty Blender session And I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')" - When I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" + When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')" Then "scene.BIMProperties.ifc_file" is "{cwd}/test/files/temp/export.ifc" Scenario: Export IFC - with basic contents and saving as another file Given an empty Blender session And I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')" - When I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc', should_save_as=True)" + When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc', should_save_as=True)" Then "scene.BIMProperties.ifc_file" is "{cwd}/test/files/temp/export.ifc" Scenario: Export IFC - with basic contents and saving as IfcJSON where import is not supported Given an empty Blender session And I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')" - When I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifcjson', should_save_as=True)" + When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifcjson', should_save_as=True)" Then "scene.BIMProperties.ifc_file" is "{cwd}/test/files/basic.ifc" Scenario: Export IFC - with basic contents and round-tripping an IfcZip Given an empty Blender session And I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')" - When I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifczip', should_save_as=True)" + When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifczip', should_save_as=True)" Then "scene.BIMProperties.ifc_file" is "{cwd}/test/files/basic.ifc" When an empty Blender session is started And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifczip')" @@ -867,14 +867,14 @@ Scenario: Export IFC - with basic contents and saving as a relative path Given an empty Blender session And I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')" When I press "wm.save_mainfile(filepath='{cwd}/test/files/temp/export.blend')" - And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc', use_relative_path=True, save_as_invoked=True)" + And I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc', use_relative_path=True, save_as_invoked=True)" Then "scene.BIMProperties.ifc_file" is "export.ifc" Scenario: Export IFC - with deleted objects synchronised Given an empty IFC project When the object "IfcBuildingStorey/My Storey" is selected And I delete the selected objects - And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" + And I press "bim.save_project(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')" Then the object "IfcBuildingStorey/My Storey" does not exist @@ -882,7 +882,7 @@ Scenario: Export IFC - with deleted objects synchronised Scenario: Export IFC - with moved object location synchronised Given an empty IFC project When the object "IfcBuildingStorey/My Storey" is moved to "0,0,1" - And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" + And I press "bim.save_project(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')" Then the object "IfcBuildingStorey/My Storey" is at "0,0,1" @@ -891,7 +891,7 @@ Scenario: Export IFC - with moved grid axis location synchronised Given an empty IFC project And I press "mesh.add_grid" When the object "IfcGridAxis/01" is moved to "1,0,0" - And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" + And I press "bim.save_project(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')" Then the object "IfcGridAxis/01" bottom left corner is at "1,-2,0" @@ -905,7 +905,7 @@ Scenario: Export IFC - with changed object scale synchronised And I press "bim.assign_class" And the object "IfcWall/Cube" is selected When the object "IfcWall/Cube" is scaled to "2" - And I press "export_ifc.bim(filepath='{cwd}/test/files/temp/export.ifc')" + And I press "bim.save_project(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')" Then the object "IfcWall/Cube" dimensions are "4,4,4"