Debian Codegraph @

src/bonsai/test/bim/feature/resource.feature

raw
1 @resource
2 Feature: Resource
3
4 Scenario: Load Resources
5 Given an empty IFC project
6 When I press "bim.load_resources"
7 Then nothing happens
8
9 Scenario: Add Crew Resource
10 Given an empty IFC project
11 When I press "bim.load_resources"
12 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
13 Then nothing happens
14
15 Scenario: Disable Editing resources
16 Given an empty IFC project
17 When I press "bim.load_resources"
18 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
19 When I press "bim.disable_resource_editing_ui"
20 Then nothing happens
21
22 Scenario: Re-enable Editing resources
23 Given an empty IFC project
24 When I press "bim.load_resources"
25 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
26 When I press "bim.disable_resource_editing_ui"
27 When I press "bim.load_resources"
28 Then nothing happens
29
30
31 Scenario: Add Labor Resource
32 Given an empty IFC project
33 When I press "bim.load_resources"
34 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
35 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
36 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
37 Then nothing happens
38
39
40 Scenario: Enable Editing Resource
41 Given an empty IFC project
42 When I press "bim.load_resources"
43 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
44 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
45 When I press "bim.enable_editing_resource(resource={crew_resource})"
46 Then nothing happens
47
48 Scenario: Edit Resource
49 Given an empty IFC project
50 When I press "bim.load_resources"
51 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
52 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
53 When I press "bim.enable_editing_resource(resource={crew_resource})"
54 And I set "scene.BIMResourceProperties.resource_attributes.get('Name').string_value" to "Foo"
55 When I press "bim.edit_resource()"
56 Then nothing happens
57
58 Scenario: Remove Resource
59 Given an empty IFC project
60 When I press "bim.load_resources"
61 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
62 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
63 When I press "bim.enable_editing_resource(resource={crew_resource})"
64 And I set "scene.BIMResourceProperties.resource_attributes.get('Name').string_value" to "Foo"
65 When I press "bim.edit_resource()"
66 When I press "bim.remove_resource(resource={crew_resource})"
67 Then nothing happens
68
69 Scenario: Remove Parent Resource
70 Given an empty IFC project
71 When I press "bim.load_resources"
72 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
73 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
74 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
75 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
76 When I press "bim.enable_editing_resource_time(resource={labor_resource})"
77 And I set "scene.BIMResourceProperties.resource_time_attributes.get('Name').string_value" to "TimelyFoo"
78 When I press "bim.edit_resource_time()"
79 When I press "bim.remove_resource(resource={crew_resource})"
80 Then nothing happens
81
82 Scenario: Enable Editing Resource time
83 Given an empty IFC project
84 When I press "bim.load_resources"
85 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
86 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
87 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
88 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
89 When I press "bim.enable_editing_resource_time(resource={labor_resource})"
90 Then nothing happens
91
92 Scenario: Disable editing resource time
93 Given an empty IFC project
94 When I press "bim.load_resources"
95 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
96 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
97 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
98 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
99 And I press "bim.enable_editing_resource_time(resource={labor_resource})"
100 When I press "bim.disable_editing_resource()"
101 Then nothing happens
102
103 Scenario: Edit Resource time
104 Given an empty IFC project
105 When I press "bim.load_resources"
106 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
107 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
108 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
109 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
110 When I press "bim.enable_editing_resource_time(resource={labor_resource})"
111 And I set "scene.BIMResourceProperties.resource_time_attributes.get('ScheduleUsage').float_value" to "305.25"
112 When I press "bim.edit_resource_time()"
113 Then nothing happens
114
115 Scenario: Enable Editing Resource Costs
116 Given an empty IFC project
117 When I press "bim.load_resources"
118 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
119 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
120 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
121 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
122 When I press "bim.enable_editing_resource_costs(resource={labor_resource})"
123 Then nothing happens
124
125 Scenario: Disable Editing Resource Costs
126 Given an empty IFC project
127 When I press "bim.load_resources"
128 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
129 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
130 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
131 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
132 When I press "bim.enable_editing_resource_costs(resource={labor_resource})"
133 When I press "bim.disable_editing_resource()"
134 Then nothing happens
135
136
137 Scenario: Add Resource Fixed Cost Value
138 Given an empty IFC project
139 When I press "bim.load_resources"
140 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
141 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
142 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
143 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
144 When I press "bim.enable_editing_resource_costs(resource={labor_resource})"
145 When I press "bim.add_cost_value(parent={labor_resource}, cost_type="FIXED")"
146 Then nothing happens
147
148 Scenario: Edit Resource Cost Value
149 Given an empty IFC project
150 When I press "bim.load_resources"
151 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
152 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
153 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
154 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
155 When I press "bim.enable_editing_resource_costs(resource={labor_resource})"
156 When I press "bim.add_cost_value(parent={labor_resource}, cost_type="FIXED")"
157 And the variable "cost_value" is "IfcStore.get_file().by_type('IfcCostValue')[0].id()"
158 When I press "bim.enable_editing_resource_cost_value(cost_value={cost_value})"
159 Then nothing happens
160
161 Scenario: Enable Editing Resource Cost Value Formula
162 Given an empty IFC project
163 When I press "bim.load_resources"
164 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
165 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
166 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
167 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
168 When I press "bim.enable_editing_resource_costs(resource={labor_resource})"
169 When I press "bim.add_cost_value(parent={labor_resource}, cost_type="FIXED")"
170 And the variable "cost_value" is "IfcStore.get_file().by_type('IfcCostValue')[0].id()"
171 When I press "bim.enable_editing_resource_cost_value(cost_value={cost_value})"
172 Then nothing happens
173
174 Scenario: Edit Resource Cost Value Formula
175 Given an empty IFC project
176 When I press "bim.load_resources"
177 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
178 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
179 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
180 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
181 When I press "bim.enable_editing_resource_costs(resource={labor_resource})"
182 When I press "bim.add_cost_value(parent={labor_resource}, cost_type="FIXED")"
183 And the variable "cost_value" is "IfcStore.get_file().by_type('IfcCostValue')[0].id()"
184 When I press "bim.enable_editing_resource_cost_value(cost_value={cost_value})"
185 And I set "scene.BIMResourceProperties.cost_value_formula" to "220*0.2"
186 When I press "bim.edit_resource_cost_value_formula(cost_value={cost_value})"
187 Then nothing happens
188
189 Scenario: Edit Resource Cost Value
190 Given an empty IFC project
191 When I press "bim.load_resources"
192 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
193 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
194 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
195 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
196 When I press "bim.enable_editing_resource_costs(resource={labor_resource})"
197 When I press "bim.add_cost_value(parent={labor_resource}, cost_type="FIXED")"
198 And the variable "cost_value" is "IfcStore.get_file().by_type('IfcCostValue')[0].id()"
199 When I press "bim.enable_editing_resource_cost_value(cost_value={cost_value})"
200 And I set "scene.BIMResourceProperties.cost_value_attributes.get('AppliedValue').float_value" to "1.00"
201 When I press "bim.edit_resource_cost_value(cost_value={cost_value})"
202 Then nothing happens
203
204 Scenario: Enable Editing Resource Quantity
205 Given an empty IFC project
206 When I press "bim.load_resources"
207 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
208 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
209 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
210 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
211 When I press "bim.enable_editing_resource_base_quantity(resource={labor_resource})"
212 When I press "bim.add_resource_quantity(resource={labor_resource}, ifc_class="IfcQuantityTime")"
213 When I press "bim.enable_editing_resource_quantity(resource={labor_resource})"
214 Then nothing happens
215
216 Scenario: Edit Resource Quantity
217 Given an empty IFC project
218 When I press "bim.load_resources"
219 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
220 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
221 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
222 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
223 When I press "bim.enable_editing_resource_base_quantity(resource={labor_resource})"
224 When I press "bim.add_resource_quantity(resource={labor_resource}, ifc_class="IfcQuantityTime")"
225 When I press "bim.enable_editing_resource_quantity(resource={labor_resource})"
226 And I set "scene.BIMResourceProperties.quantity_attributes.get('TimeValue').float_value" to "50.00"
227 And the variable "quantity_time" is "IfcStore.get_file().by_type('IfcQuantityTime')[0].id()"
228 When I press "bim.edit_resource_quantity(physical_quantity={quantity_time})"
229 Then nothing happens
230
231 Scenario: Remove Resource Quantity
232 Given an empty IFC project
233 When I press "bim.load_resources"
234 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
235 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
236 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
237 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
238 When I press "bim.enable_editing_resource_base_quantity(resource={labor_resource})"
239 When I press "bim.add_resource_quantity(resource={labor_resource}, ifc_class="IfcQuantityTime")"
240 When I press "bim.remove_resource_quantity(resource={labor_resource})"
241 Then nothing happens
242
243 Scenario: Add Productivity data
244 Given an empty IFC project
245 When I press "bim.load_resources"
246 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
247 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
248 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
249 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
250 And I set "scene.BIMResourceProperties.active_resource_index" to "1"
251 And I press "bim.add_productivity_data"
252 And I set "scene.BIMResourceProperties.should_show_resource_tools" to "True"
253 And I set "scene.BIMResourceProductivity.quantity_produced" to "5.00"
254 And I set "scene.BIMResourceProductivity.quantity_produced_name" to "GrossSideArea"
255 And I set "scene.BIMResourceProductivity.quantity_consumed[0].hours" to "5"
256 When I press "bim.edit_productivity_data()"
257 And the variable "productivity_data" is "IfcStore.get_file().by_type('IfcPropertySet')[-1].id()"
258
259
260 Scenario: Calculate Resource Work
261 Given an empty IFC project
262 And I press "bim.add_work_schedule"
263 And the variable "work_schedule" is "IfcStore.get_file().by_type('IfcWorkSchedule')[0].id()"
264 And I press "bim.enable_editing_work_schedule_tasks(work_schedule={work_schedule})"
265 And I press "bim.add_summary_task(work_schedule={work_schedule})"
266 And the variable "task" is "IfcStore.get_file().by_type('IfcTask')[0].id()"
267 And I press "bim.enable_editing_task_attributes(task={task})"
268 And I set "scene.BIMWorkScheduleProperties.task_attributes.get('PredefinedType').enum_value" to "CONSTRUCTION"
269 And I press "bim.edit_task"
270 And I press "bim.enable_editing_task_time(task={task})"
271 And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get('ScheduleStart').string_value" to "2021-01-02"
272 And I set "scene.BIMWorkScheduleProperties.task_time_attributes.get('ScheduleFinish').string_value" to "2021-01-06"
273 And I press "bim.edit_task_time"
274 And I add a cube
275 And the object "Cube" is selected
276 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
277 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
278 And I press "bim.assign_class"
279 And the object "IfcWall/Cube" is selected
280 And I set "active_object.PsetProperties.qto_name" to "Qto_WallBaseQuantities"
281 When I press "bim.add_qto(obj='IfcWall/Cube', obj_type='Object')"
282 And I set "active_object.PsetProperties.properties[5].metadata.float_value" to "50.00"
283 And I press "bim.edit_pset(obj='IfcWall/Cube', obj_type='Object')"
284 When I press "bim.load_resources"
285 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
286 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
287 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
288 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
289 And I set "scene.BIMResourceProperties.active_resource_index" to "1"
290 And I press "bim.add_productivity_data"
291 And I set "scene.BIMResourceProperties.should_show_resource_tools" to "True"
292 And I set "scene.BIMResourceProductivity.quantity_produced" to "5.00"
293 And I set "scene.BIMResourceProductivity.quantity_produced_name" to "GrossSideArea"
294 And I set "scene.BIMResourceProductivity.quantity_consumed[0].hours" to "5"
295 When I press "bim.edit_productivity_data()"
296 And the variable "productivity_data" is "IfcStore.get_file().by_type('IfcPropertySet')[-1].id()"
297 When I press "bim.calculate_resource_work(resource={labor_resource})"
298 Then nothing happens
299
300
301 Scenario: Assign Resource
302 Given an empty IFC project
303 When I press "bim.load_resources"
304 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
305 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
306 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
307 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
308 And I add a cube
309 And the object "Cube" is selected
310 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
311 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
312 And I press "bim.assign_class"
313 And the object "IfcWall/Cube" is selected
314 And I press "bim.assign_resource(resource={labor_resource})"
315 Then nothing happens
316
317 Scenario: Unassign Resource
318 Given an empty IFC project
319 When I press "bim.load_resources"
320 When I press "bim.add_resource(ifc_class="IfcCrewResource")"
321 And the variable "crew_resource" is "IfcStore.get_file().by_type('IfcCrewResource')[0].id()"
322 When I press "bim.add_resource(ifc_class="IfcLaborResource", parent_resource={crew_resource})"
323 And the variable "labor_resource" is "IfcStore.get_file().by_type('IfcLaborResource')[0].id()"
324 And I add a cube
325 And the object "Cube" is selected
326 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
327 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
328 And I press "bim.assign_class"
329 And the object "IfcWall/Cube" is selected
330 And I press "bim.assign_resource(resource={labor_resource})"
331 And the object "IfcWall/Cube" is selected
332 And I press "bim.unassign_resource(resource={labor_resource})"
333 Then nothing happens