mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
fix materials / styles bim tests #4843
This commit is contained in:
@@ -3,13 +3,13 @@ Feature: Material
|
||||
|
||||
Scenario: Load materials
|
||||
Given an empty IFC project
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
When I press "bim.load_materials"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Disable editing materials
|
||||
Given an empty IFC project
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I press "bim.load_materials"
|
||||
When I press "bim.disable_editing_materials"
|
||||
Then nothing happens
|
||||
@@ -17,8 +17,8 @@ Scenario: Disable editing materials
|
||||
Scenario: Load materials - then add material
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_materials"
|
||||
When I press "bim.add_material(obj='')"
|
||||
Then the material "Default" exists
|
||||
When I press "bim.add_material()"
|
||||
Then the IFC material "Default" exists
|
||||
|
||||
Scenario: Load materials - then add material set
|
||||
Given an empty IFC project
|
||||
@@ -29,26 +29,8 @@ Scenario: Load materials - then add material set
|
||||
|
||||
Scenario: Add default material
|
||||
Given an empty IFC project
|
||||
When I press "bim.add_material(obj='')"
|
||||
Then the material "Default" exists
|
||||
|
||||
Scenario: Add material
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I add a material
|
||||
When I press "bim.add_material(obj='Material')"
|
||||
Then the material "Material" is an IFC material
|
||||
|
||||
Scenario: Remove material
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I add a material
|
||||
And I press "bim.add_material(obj='Material')"
|
||||
And the variable "material" is "{ifc}.by_type('IfcMaterial')[0].id()"
|
||||
When I press "bim.remove_material(material={material})"
|
||||
Then the material "Material" does not exist
|
||||
When I press "bim.add_material()"
|
||||
Then the IFC material "Default" exists
|
||||
|
||||
Scenario: Remove material set
|
||||
Given an empty IFC project
|
||||
@@ -66,10 +48,10 @@ Scenario: Assign material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
Then the object "IfcWall/Cube" has the material "Default"
|
||||
Then the object "IfcWall/Cube" has the IFC material "Default"
|
||||
|
||||
Scenario: Unassign material - single material
|
||||
Given an empty IFC project
|
||||
@@ -78,7 +60,7 @@ Scenario: Unassign material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.unassign_material"
|
||||
@@ -91,7 +73,7 @@ Scenario: Enable editing assigned material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.enable_editing_assigned_material"
|
||||
@@ -104,7 +86,7 @@ Scenario: Disable editing assigned material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -118,7 +100,7 @@ Scenario: Edit assigned material - single material
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterial"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -133,7 +115,7 @@ Scenario: Assign material - material layer set
|
||||
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 press "bim.add_material()"
|
||||
When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
Then the object "IfcWallType/Empty" does not have the material "Default"
|
||||
@@ -146,7 +128,7 @@ Scenario: Unassign material - material layer set
|
||||
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 press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.unassign_material"
|
||||
@@ -166,7 +148,7 @@ Scenario: Unassign material - removing inherited material
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
|
||||
@@ -191,7 +173,7 @@ Scenario: Enable editing assigned material - material layer set
|
||||
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 press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.enable_editing_assigned_material"
|
||||
@@ -209,7 +191,7 @@ Scenario: Disable editing assigned material - material layer set
|
||||
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 press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -228,7 +210,7 @@ Scenario: Edit assigned material - material layer set
|
||||
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 press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -243,7 +225,7 @@ Scenario: Assign material - material profile set
|
||||
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 press "bim.add_material()"
|
||||
When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
Then the object "IfcWallType/Empty" does not have the material "Default"
|
||||
@@ -256,7 +238,7 @@ Scenario: Unassign material - material profile set
|
||||
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 press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.unassign_material"
|
||||
@@ -274,7 +256,7 @@ Scenario: Enable editing assigned material - material profile set
|
||||
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 press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.enable_editing_assigned_material"
|
||||
@@ -292,7 +274,7 @@ Scenario: Disable editing assigned material - material profile set
|
||||
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 press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -311,7 +293,7 @@ Scenario: Edit assigned material - material profile set
|
||||
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 press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -326,7 +308,7 @@ Scenario: Assign material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
Then nothing happens
|
||||
@@ -338,7 +320,7 @@ Scenario: Unassign material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.unassign_material"
|
||||
@@ -351,7 +333,7 @@ Scenario: Enable editing assigned material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
When I press "bim.enable_editing_assigned_material"
|
||||
@@ -364,7 +346,7 @@ Scenario: Disable editing assigned material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -378,7 +360,7 @@ Scenario: Edit assigned material - material constituent set
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialConstituentSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -389,7 +371,7 @@ Scenario: Edit assigned material - material constituent set
|
||||
Scenario: Select by material
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And the variable "material" is "{ifc}.by_type('IfcMaterial')[0].id()"
|
||||
When I press "bim.select_by_material(material={material})"
|
||||
Then nothing happens
|
||||
@@ -397,14 +379,14 @@ Scenario: Select by material
|
||||
Scenario: Expand material category
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
When I press "bim.expand_material_category(category='')"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Contract material category
|
||||
Given an empty IFC project
|
||||
And I press "bim.load_materials"
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I press "bim.expand_material_category(category='')"
|
||||
When I press "bim.contract_material_category(category='')"
|
||||
Then nothing happens
|
||||
@@ -435,7 +417,7 @@ Scenario: Add material set layer
|
||||
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 press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
And I press "bim.enable_editing_assigned_material"
|
||||
@@ -457,7 +439,7 @@ Scenario: Remove material set layer
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
|
||||
And I press "bim.assign_class"
|
||||
|
||||
And I press "bim.add_material(obj='')"
|
||||
And I press "bim.add_material()"
|
||||
And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet"
|
||||
And I press "bim.assign_material"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user