BBIM: fix material errors, and add smoke tests

This commit is contained in:
Sigma Dimensions
2023-02-20 17:49:54 +01:00
parent 378a25bbaa
commit 40560b71c2
2 changed files with 46 additions and 5 deletions
@@ -396,7 +396,7 @@ Scenario: Contract material category
When I press "bim.contract_material_category(category='')"
Then nothing happens
Scenario: Enable Editing Material set Item
Scenario: Enable editing material set item
Given an empty IFC project
And I load the demo construction library
When I set "scene.BIMModelProperties.ifc_class" to "IfcColumnType"
@@ -407,4 +407,45 @@ Scenario: Enable Editing Material set Item
And the variable "relating_material" is "{ifc}.by_id({column_type}).HasAssociations[0].RelatingMaterial.id()"
And the variable "material_profile" is "{ifc}.by_id({column_type}).HasAssociations[0].RelatingMaterial.MaterialProfiles[0].id()"
And I press "bim.enable_editing_assigned_material"
And I press "bim.enable_editing_material_set_item(material_set_item={material_profile})"
When I press "bim.enable_editing_material_set_item(material_set_item={material_profile})"
Then nothing happens
Scenario: Add material set layer
Given an empty IFC project
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"
And I add an empty
And the object "Empty" is selected
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
And I press "bim.assign_class"
And I press "bim.add_material(obj='')"
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
And I press "bim.assign_material"
And I press "bim.enable_editing_assigned_material"
And the variable "material_set" is "{ifc}.by_type('IfcMaterialLayerSet')[0].id()"
When I press "bim.add_layer(layer_set={material_set})"
Then nothing happens
Scenario: Remove material set layer
Given an empty IFC project
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"
And I add an empty
And the object "Empty" is selected
And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
And I press "bim.assign_class"
And I press "bim.add_material(obj='')"
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
And I press "bim.assign_material"
And I press "bim.enable_editing_assigned_material"
And the variable "material_set" is "{ifc}.by_type('IfcMaterialLayerSet')[0].id()"
And I press "bim.remove_layer(layer={ifc}.by_id({material_set}).MaterialLayers[0].id())"
And I press "bim.add_layer(layer_set={material_set})"
When I press "bim.remove_layer(layer={ifc}.by_id({material_set}).MaterialLayers[0].id())"
Then nothing happens