Organisations now support null attributes.

This commit is contained in:
Dion Moult
2021-09-29 18:39:10 +10:00
parent 406fd158d3
commit beff90cd5e
16 changed files with 454 additions and 315 deletions
+2 -1
View File
@@ -95,6 +95,7 @@ def additionally_the_object_name_is_selected(name):
bpy.context.view_layer.objects.active = obj
obj.select_set(True)
def i_deselect_all_objects():
bpy.context.view_layer.objects.active = None
bpy.ops.object.select_all(action="DESELECT")
@@ -346,7 +347,7 @@ definitions = {
'I add a cube of size "([0-9]+)" at "(.*)"': i_add_a_cube_of_size_size_at_location,
'the object "(.*)" is selected': the_object_name_is_selected,
'additionally the object "(.*)" is selected': additionally_the_object_name_is_selected,
'I deselect all objects': i_deselect_all_objects,
"I deselect all objects": i_deselect_all_objects,
'I am on frame "([0-9]+)"': i_am_on_frame_number,
'I set "(.*)" to "(.*)"': i_set_prop_to_value,
'"(.*)" is "(.*)"': prop_is_value,
@@ -165,3 +165,38 @@ Scenario: Edit address
And I press "bim.enable_editing_address(address={address})"
And I press "bim.edit_address()"
Then nothing happens
Scenario: Add organisation
Given an empty IFC project
When I press "bim.add_organisation"
Then nothing happens
Scenario: Enable editing organisation
Given an empty IFC project
When I press "bim.add_organisation"
And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
And I press "bim.enable_editing_organisation(organisation={organisation})"
Then "scene.BIMOwnerProperties.active_organisation_id" is "{organisation}"
Scenario: Disable editing organisation
Given an empty IFC project
When I press "bim.add_organisation"
And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
And I press "bim.enable_editing_organisation(organisation={organisation})"
And I press "bim.disable_editing_organisation"
Then "scene.BIMOwnerProperties.active_organisation_id" is "0"
Scenario: Edit organisation
Given an empty IFC project
When I press "bim.add_organisation"
And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
And I press "bim.enable_editing_organisation(organisation={organisation})"
And I press "bim.edit_organisation"
Then "scene.BIMOwnerProperties.active_organisation_id" is "0"
Scenario: Remove organisation
Given an empty IFC project
When I press "bim.add_organisation"
And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
And I press "bim.remove_organisation(organisation={organisation})"
Then nothing happens
@@ -382,7 +382,7 @@ class TestRemoveFilling(test.bim.bootstrap.NewFile):
And I delete the selected objects
Then the object "IfcOpeningElement/Cube" is an "IfcOpeningElement"
And the void "IfcOpeningElement/Cube" is not filled by "Cube"
"""
"""
@test.bim.bootstrap.scenario
def test_removing_a_filling_using_deletion_on_the_opening(self):