Fix bug where an added default material was not linked and auto synced.

This commit is contained in:
Dion Moult
2021-11-10 18:01:10 +11:00
parent a7b3b5261f
commit 28e5af853d
11 changed files with 55 additions and 42 deletions
@@ -6,7 +6,24 @@ Scenario: Add default material
When I press "bim.add_default_material"
Then the material "Default" exists
Scenario: Unlink object
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"
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"
When I press "bim.remove_material"
Then the material "Material" is not an IFC material
Scenario: Unlink material
Given an empty IFC project
And I add a cube
And the object "Cube" is selected
+6
View File
@@ -367,6 +367,12 @@ def the_object_name_is_not_an_ifc_element(name):
assert id != 0, f"The ID is {id}"
@then(parsers.parse('the material "{name}" is an IFC material'))
def the_material_name_is_not_an_ifc_material(name):
id = the_material_name_exists(name).BIMObjectProperties.ifc_definition_id
assert id != 0, f"The ID is {id}"
@then(parsers.parse('the material "{name}" is not an IFC material'))
def the_material_name_is_not_an_ifc_material(name):
id = the_material_name_exists(name).BIMObjectProperties.ifc_definition_id