diff --git a/src/blenderbim/test/bim/bootstrap.py b/src/blenderbim/test/bim/bootstrap.py index 8b3392e073..f57d35bcde 100644 --- a/src/blenderbim/test/bim/bootstrap.py +++ b/src/blenderbim/test/bim/bootstrap.py @@ -37,6 +37,9 @@ class NewFile: def setup(self): IfcStore.purge() bpy.ops.wm.read_homefile(app_template="") + while bpy.data.objects: + bpy.data.objects.remove(bpy.data.objects[0]) + bpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True) def scenario(function): diff --git a/src/blenderbim/test/bim/module/root/test_operator.py b/src/blenderbim/test/bim/module/root/test_operator.py index e43a6c1688..554b5c7003 100644 --- a/src/blenderbim/test/bim/module/root/test_operator.py +++ b/src/blenderbim/test/bim/module/root/test_operator.py @@ -24,6 +24,7 @@ class TestAssignClass(test.bim.bootstrap.NewFile): def test_assigning_a_class_to_a_cube(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" @@ -36,6 +37,7 @@ class TestAssignClass(test.bim.bootstrap.NewFile): def test_assigning_a_type_class_to_a_cube(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType" And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" @@ -49,6 +51,7 @@ class TestAssignClass(test.bim.bootstrap.NewFile): def test_assigning_a_spatial_class_to_a_cube(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_product" to "IfcSpatialElement" And I set "scene.BIMRootProperties.ifc_class" to "IfcBuilding" @@ -62,6 +65,7 @@ class TestAssignClass(test.bim.bootstrap.NewFile): def test_assigning_an_opening_class_to_a_cube(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_product" to "IfcElement" And I set "scene.BIMRootProperties.ifc_class" to "IfcOpeningElement" @@ -76,6 +80,7 @@ class TestAssignClass(test.bim.bootstrap.NewFile): def test_assigning_a_class_to_a_cube_in_a_collection(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And the object "Cube" is placed in the collection "IfcBuildingStorey/My Storey" And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" @@ -89,6 +94,7 @@ class TestCopyClass(test.bim.bootstrap.NewFile): def test_copying_a_wall(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" @@ -112,6 +118,7 @@ class TestCopyClass(test.bim.bootstrap.NewFile): def test_copying_an_opening(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" diff --git a/src/blenderbim/test/bim/module/sequence/test_operator.py b/src/blenderbim/test/bim/module/sequence/test_operator.py index a46be62aa0..81fa457ae1 100644 --- a/src/blenderbim/test/bim/module/sequence/test_operator.py +++ b/src/blenderbim/test/bim/module/sequence/test_operator.py @@ -52,6 +52,7 @@ class TestVisualiseWorkScheduleDateRange(test.bim.bootstrap.NewFile): And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get("ScheduleStart").string_value" to "2021-01-02" And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get("ScheduleFinish").string_value" to "2021-01-06" And I press "bim.edit_task_time" + And I add a cube And the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" @@ -88,6 +89,7 @@ class TestVisualiseWorkScheduleDateRange(test.bim.bootstrap.NewFile): And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get("ScheduleStart").string_value" to "2021-01-02" And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get("ScheduleFinish").string_value" to "2021-01-06" And I press "bim.edit_task_time" + And I add a cube And the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" @@ -127,6 +129,7 @@ class TestVisualiseWorkScheduleDateRange(test.bim.bootstrap.NewFile): And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get("ScheduleStart").string_value" to "2021-01-02" And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get("ScheduleFinish").string_value" to "2021-01-06" And I press "bim.edit_task_time" + And I add a cube And the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" @@ -211,6 +214,7 @@ class TestVisualiseWorkScheduleDateRange(test.bim.bootstrap.NewFile): And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get("ScheduleStart").string_value" to "2021-01-02" And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get("ScheduleFinish").string_value" to "2021-01-06" And I press "bim.edit_task_time" + And I add a cube And the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" diff --git a/src/blenderbim/test/bim/module/void/test_operator.py b/src/blenderbim/test/bim/module/void/test_operator.py index 3e4997438a..96cba2d83e 100644 --- a/src/blenderbim/test/bim/module/void/test_operator.py +++ b/src/blenderbim/test/bim/module/void/test_operator.py @@ -24,6 +24,7 @@ class TestAddOpening(test.bim.bootstrap.NewFile): def test_adding_an_opening(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" @@ -43,6 +44,7 @@ class TestRemoveOpening(test.bim.bootstrap.NewFile): def test_removing_an_opening_manually(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" @@ -60,6 +62,7 @@ class TestRemoveOpening(test.bim.bootstrap.NewFile): def test_removing_a_non_dynamic_opening_manually(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" @@ -80,6 +83,7 @@ class TestRemoveOpening(test.bim.bootstrap.NewFile): def test_removing_an_opening_using_deletion(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" @@ -97,6 +101,7 @@ class TestRemoveOpening(test.bim.bootstrap.NewFile): def test_removing_an_opening_indirectly_by_deleting_its_building_element(self): return """ Given an empty IFC project + Given I add a cube When the object "Cube" is selected And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class"