Debian Codegraph @

src/bonsai/test/bim/feature/classification.feature

raw
1 @classification
2 Feature: Classification
3
4 Scenario: Load classification library
5 Given an empty IFC project
6 When I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
7 Then nothing happens
8
9 Scenario: Add classification
10 Given an empty IFC project
11 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
12 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
13 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
14 When I press "bim.add_classification"
15 Then nothing happens
16
17 Scenario: Add classification - IFC2X3
18 Given an empty IFC2X3 project
19 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
20 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
21 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
22 When I press "bim.add_classification"
23 Then nothing happens
24
25 Scenario: Enable editing classification
26 Given an empty IFC project
27 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
28 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
29 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
30 And I press "bim.add_classification"
31 And the variable "classification" is "{ifc}.by_type('IfcClassification')[0].id()"
32 When I press "bim.enable_editing_classification(classification={classification})"
33 Then nothing happens
34
35 Scenario: Disable editing classification
36 Given an empty IFC project
37 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
38 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
39 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
40 And I press "bim.add_classification"
41 And the variable "classification" is "{ifc}.by_type('IfcClassification')[0].id()"
42 And I press "bim.enable_editing_classification(classification={classification})"
43 When I press "bim.disable_editing_classification"
44 Then nothing happens
45
46 Scenario: Remove classification
47 Given an empty IFC project
48 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
49 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
50 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
51 And I press "bim.add_classification"
52 And the variable "classification" is "{ifc}.by_type('IfcClassification')[0].id()"
53 When I press "bim.remove_classification(classification={classification})"
54 Then nothing happens
55
56 Scenario: Edit classification
57 Given an empty IFC project
58 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
59 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
60 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
61 And I press "bim.add_classification"
62 And the variable "classification" is "{ifc}.by_type('IfcClassification')[0].id()"
63 And I press "bim.enable_editing_classification(classification={classification})"
64 When I press "bim.edit_classification"
65 Then nothing happens
66
67 Scenario: Add classification reference - object
68 Given an empty IFC project
69 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
70 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
71 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
72 And I press "bim.add_classification"
73 And I add a cube
74 And the object "Cube" is selected
75 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
76 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
77 And I press "bim.assign_class"
78 And I press "bim.change_classification_level(parent_id={classification})"
79 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
80 When I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
81 Then nothing happens
82
83 Scenario: Change classification level
84 Given an empty IFC project
85 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
86 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
87 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
88 And I press "bim.add_classification"
89 And I add a cube
90 And the object "Cube" is selected
91 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
92 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
93 And I press "bim.assign_class"
94 And I press "bim.change_classification_level(parent_id={classification})"
95 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
96 When I press "bim.change_classification_level(parent_id={reference})"
97 Then nothing happens
98
99 Scenario: Disable editing classification references
100 Given an empty IFC project
101 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
102 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
103 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
104 And I press "bim.add_classification"
105 And I add a cube
106 And the object "Cube" is selected
107 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
108 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
109 And I press "bim.assign_class"
110 And I press "bim.change_classification_level(parent_id={classification})"
111 When I press "bim.disable_editing_classification_references"
112 Then nothing happens
113
114 Scenario: Enable editing classification reference
115 Given an empty IFC project
116 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
117 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
118 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
119 And I press "bim.add_classification"
120 And I add a cube
121 And the object "Cube" is selected
122 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
123 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
124 And I press "bim.assign_class"
125 And I press "bim.change_classification_level(parent_id={classification})"
126 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
127 And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
128 And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()"
129 When I press "bim.enable_editing_classification_reference(reference={reference})"
130 Then nothing happens
131
132 Scenario: Disable editing classification reference
133 Given an empty IFC project
134 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
135 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
136 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
137 And I press "bim.add_classification"
138 And I add a cube
139 And the object "Cube" is selected
140 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
141 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
142 And I press "bim.assign_class"
143 And I press "bim.change_classification_level(parent_id={classification})"
144 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
145 And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
146 And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()"
147 And I press "bim.enable_editing_classification_reference(reference={reference})"
148 When I press "bim.disable_editing_classification_reference"
149 Then nothing happens
150
151 Scenario: Remove classification reference - object
152 Given an empty IFC project
153 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
154 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
155 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
156 And I press "bim.add_classification"
157 And I add a cube
158 And the object "Cube" is selected
159 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
160 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
161 And I press "bim.assign_class"
162 And I press "bim.change_classification_level(parent_id={classification})"
163 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
164 And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
165 And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()"
166 And I press "bim.enable_editing_classification_reference(reference={reference})"
167 When I press "bim.remove_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
168 Then nothing happens
169
170 Scenario: Edit classification reference
171 Given an empty IFC project
172 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
173 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
174 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
175 And I press "bim.add_classification"
176 And I add a cube
177 And the object "Cube" is selected
178 And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType"
179 And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType"
180 And I press "bim.assign_class"
181 And I press "bim.change_classification_level(parent_id={classification})"
182 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
183 And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')"
184 And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()"
185 And I press "bim.enable_editing_classification_reference(reference={reference})"
186 When I press "bim.edit_classification_reference"
187 Then nothing happens
188
189 Scenario: Add classification reference - material
190 Given an empty IFC project
191 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
192 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
193 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
194 And I press "bim.add_classification"
195 And I press "bim.add_material(name='Material')"
196 And I press "bim.load_materials"
197 And I press "bim.expand_material_category(category='Uncategorised')"
198 And I set "scene.BIMMaterialProperties.active_material_index" to "1"
199 And the variable "material" is "{ifc}.by_type('IfcMaterial')[0].id()"
200 And I press "bim.change_classification_level(parent_id={classification})"
201 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
202 When I press "bim.add_classification_reference(reference={reference}, obj_type='Material')"
203 Then nothing happens
204
205 Scenario: Remove classification reference - material
206 Given an empty IFC project
207 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
208 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
209 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
210 And I press "bim.add_classification"
211 And I press "bim.add_material(name='Material')"
212 And I press "bim.load_materials"
213 And I press "bim.expand_material_category(category='Uncategorised')"
214 And I set "scene.BIMMaterialProperties.active_material_index" to "1"
215 And I press "bim.change_classification_level(parent_id={classification})"
216 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
217 And I press "bim.add_classification_reference(reference={reference}, obj_type='Material')"
218 When I press "bim.remove_classification_reference(reference={reference}, obj_type='Material')"
219 Then nothing happens
220
221 Scenario: Add classification reference - cost
222 Given an empty IFC project
223 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
224 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
225 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
226 And I press "bim.add_classification"
227 And I press "bim.add_cost_schedule"
228 And the variable "cost_schedule" is "{ifc}.by_type('IfcCostSchedule')[0].id()"
229 And I press "bim.enable_editing_cost_items(cost_schedule={cost_schedule})"
230 And I press "bim.add_summary_cost_item()"
231 And I press "bim.change_classification_level(parent_id={classification})"
232 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
233 When I press "bim.add_classification_reference(reference={reference}, obj='', obj_type='Cost')"
234 Then nothing happens
235
236 Scenario: Remove classification reference - cost
237 Given an empty IFC project
238 And I press "bim.load_classification_library(filepath='{cwd}/test/files/classification.ifc')"
239 And the variable "classification" is "{classification_ifc}.by_type('IfcClassification')[0].id()"
240 And I set "scene.BIMClassificationProperties.available_classifications" to "{classification}"
241 And I press "bim.add_classification"
242 And I press "bim.add_cost_schedule"
243 And the variable "cost_schedule" is "{ifc}.by_type('IfcCostSchedule')[0].id()"
244 And I press "bim.enable_editing_cost_items(cost_schedule={cost_schedule})"
245 And I press "bim.add_summary_cost_item()"
246 And I press "bim.change_classification_level(parent_id={classification})"
247 And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()"
248 And I press "bim.add_classification_reference(reference={reference}, obj='', obj_type='Cost')"
249 When I press "bim.remove_classification_reference(reference={reference}, obj='', obj_type='Cost')"
250 Then nothing happens