Fix #2304. You can now manage classifications for materials. Bulk classification now supported.

This commit is contained in:
Dion Moult
2022-09-03 15:33:52 +10:00
parent 557d3429eb
commit e34b737428
6 changed files with 186 additions and 59 deletions
@@ -64,7 +64,7 @@ Scenario: Edit classification
When I press "bim.edit_classification"
Then nothing happens
Scenario: Add classification reference
Scenario: Add classification reference - object
Given an empty IFC project
And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
@@ -77,7 +77,7 @@ Scenario: Add classification reference
And I press "bim.assign_class"
And I press "bim.change_classification_level(parent_id={classification})"
And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
When I press "bim.add_classification_reference(reference={reference})"
When I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
Then nothing happens
Scenario: Change classification level
@@ -124,7 +124,7 @@ Scenario: Enable editing classification reference
And I press "bim.assign_class"
And I press "bim.change_classification_level(parent_id={classification})"
And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
And I press "bim.add_classification_reference(reference={reference})"
And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()"
When I press "bim.enable_editing_classification_reference(reference={reference})"
Then nothing happens
@@ -142,13 +142,13 @@ Scenario: Disable editing classification reference
And I press "bim.assign_class"
And I press "bim.change_classification_level(parent_id={classification})"
And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
And I press "bim.add_classification_reference(reference={reference})"
And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()"
And I press "bim.enable_editing_classification_reference(reference={reference})"
When I press "bim.disable_editing_classification_reference"
Then nothing happens
Scenario: Remove classification reference
Scenario: Remove classification reference - object
Given an empty IFC project
And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
@@ -161,10 +161,10 @@ Scenario: Remove classification reference
And I press "bim.assign_class"
And I press "bim.change_classification_level(parent_id={classification})"
And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
And I press "bim.add_classification_reference(reference={reference})"
And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()"
And I press "bim.enable_editing_classification_reference(reference={reference})"
When I press "bim.remove_classification_reference(reference={reference})"
When I press "bim.remove_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
Then nothing happens
Scenario: Edit classification reference
@@ -180,8 +180,39 @@ Scenario: Edit classification reference
And I press "bim.assign_class"
And I press "bim.change_classification_level(parent_id={classification})"
And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
And I press "bim.add_classification_reference(reference={reference})"
And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()"
And I press "bim.enable_editing_classification_reference(reference={reference})"
When I press "bim.edit_classification_reference"
Then nothing happens
Scenario: Add classification reference - material
Given an empty IFC project
And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
And I press "bim.add_classification"
And I add a cube
And I add a material
And I press "bim.add_material(obj='Material')"
And the variable "material" is "{ifc}.by_type('IfcMaterial')[0].id()"
And I press "bim.change_classification_level(parent_id={classification})"
And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
When I press "bim.add_classification_reference(reference={reference}, obj='Material', obj_type='Material')"
Then nothing happens
Scenario: Remove classification reference - material
Given an empty IFC project
And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
And I press "bim.add_classification"
And I add a cube
And I add a material
And I press "bim.add_material(obj='Material')"
And the variable "material" is "{ifc}.by_type('IfcMaterial')[0].id()"
And I press "bim.change_classification_level(parent_id={classification})"
And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
And I press "bim.add_classification_reference(reference={reference}, obj='Material', obj_type='Material')"
When I press "bim.remove_classification_reference(reference={reference}, obj='Material', obj_type='Material')"
Then nothing happens