Debian Codegraph @

src/bonsai/test/bim/feature/owner.feature

raw
1 @owner
2 Feature: Owner
3
4 Scenario: Add person
5 Given an empty IFC project
6 When I press "bim.add_person"
7 Then nothing happens
8
9 Scenario: Remove person
10 Given an empty IFC project
11 When I press "bim.add_person"
12 And the variable "person" is "{ifc}.by_type('IfcPerson')[-1].id()"
13 And I press "bim.remove_person(person={person})"
14 Then nothing happens
15
16 Scenario: Add person attribute
17 Given an empty IFC project
18 When I press "bim.add_person"
19 And I press "bim.add_person_attribute(name='MiddleNames')"
20 And I press "bim.add_person_attribute(name='PrefixTitles')"
21 And I press "bim.add_person_attribute(name='SuffixTitles')"
22 Then nothing happens
23
24 Scenario: Remove person attribute
25 Given an empty IFC project
26 When I press "bim.add_person"
27 And I press "bim.add_person_attribute(name='MiddleNames')"
28 And I press "bim.remove_person_attribute(name='MiddleNames', id=0)"
29 And I press "bim.add_person_attribute(name='PrefixTitles')"
30 And I press "bim.remove_person_attribute(name='PrefixTitles', id=0)"
31 And I press "bim.add_person_attribute(name='SuffixTitles')"
32 And I press "bim.remove_person_attribute(name='SuffixTitles', id=0)"
33 Then nothing happens
34
35 Scenario: Enable editing person
36 Given an empty IFC project
37 When I press "bim.add_person"
38 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
39 And I press "bim.enable_editing_person(person={person})"
40 Then "scene.BIMOwnerProperties.active_person_id" is "{person}"
41
42 Scenario: Disable editing person
43 Given an empty IFC project
44 When I press "bim.add_person"
45 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
46 And I press "bim.enable_editing_person(person={person})"
47 And I press "bim.disable_editing_person"
48 Then "scene.BIMOwnerProperties.active_person_id" is "0"
49
50 Scenario: Edit person
51 Given an empty IFC project
52 When I press "bim.add_person"
53 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
54 And I press "bim.enable_editing_person(person={person})"
55 And I press "bim.edit_person"
56 Then "scene.BIMOwnerProperties.active_person_id" is "0"
57
58 Scenario: Add role
59 Given an empty IFC project
60 When I press "bim.add_person"
61 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
62 And I press "bim.add_role(parent={person})"
63 Then nothing happens
64
65 Scenario: Remove role
66 Given an empty IFC project
67 When I press "bim.add_person"
68 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
69 And I press "bim.add_role(parent={person})"
70 And the variable "role" is "{ifc}.by_type('IfcActorRole')[0].id()"
71 And I press "bim.remove_role(role={role})"
72 Then nothing happens
73
74 Scenario: Enable editing role
75 Given an empty IFC project
76 When I press "bim.add_person"
77 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
78 And I press "bim.add_role(parent={person})"
79 And the variable "role" is "{ifc}.by_type('IfcActorRole')[0].id()"
80 And I press "bim.enable_editing_role(role={role})"
81 Then nothing happens
82
83 Scenario: Disable editing role
84 Given an empty IFC project
85 When I press "bim.add_person"
86 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
87 And I press "bim.add_role(parent={person})"
88 And the variable "role" is "{ifc}.by_type('IfcActorRole')[0].id()"
89 And I press "bim.enable_editing_role(role={role})"
90 And I press "bim.disable_editing_role()"
91 Then nothing happens
92
93 Scenario: Edit role
94 Given an empty IFC project
95 When I press "bim.add_person"
96 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
97 And I press "bim.add_role(parent={person})"
98 And the variable "role" is "{ifc}.by_type('IfcActorRole')[0].id()"
99 And I press "bim.enable_editing_role(role={role})"
100 And I press "bim.edit_role()"
101 Then nothing happens
102
103 Scenario: Add address
104 Given an empty IFC project
105 When I press "bim.add_person"
106 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
107 And I press "bim.add_address(parent={person}, ifc_class='IfcPostalAddress')"
108 Then nothing happens
109
110 Scenario: Add address attribute
111 Given an empty IFC project
112 When I press "bim.add_person"
113 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
114 And I press "bim.add_address(parent={person}, ifc_class='IfcPostalAddress')"
115 And the variable "address" is "{ifc}.by_type('IfcPostalAddress')[0].id()"
116 And I press "bim.enable_editing_address(address={address})"
117 And I press "bim.add_address_attribute(name='AddressLines')"
118 Then nothing happens
119
120 Scenario: Remove address attribute
121 Given an empty IFC project
122 When I press "bim.add_person"
123 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
124 And I press "bim.add_address(parent={person}, ifc_class='IfcPostalAddress')"
125 And the variable "address" is "{ifc}.by_type('IfcPostalAddress')[0].id()"
126 And I press "bim.enable_editing_address(address={address})"
127 And I press "bim.add_address_attribute(name='AddressLines')"
128 And I press "bim.remove_address_attribute(name='AddressLines', id=0)"
129 Then nothing happens
130
131 Scenario: Remove address
132 Given an empty IFC project
133 When I press "bim.add_person"
134 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
135 And I press "bim.add_address(parent={person}, ifc_class='IfcPostalAddress')"
136 And the variable "address" is "{ifc}.by_type('IfcPostalAddress')[0].id()"
137 And I press "bim.remove_address(address={address})"
138 Then nothing happens
139
140 Scenario: Enable editing address
141 Given an empty IFC project
142 When I press "bim.add_person"
143 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
144 And I press "bim.add_address(parent={person}, ifc_class='IfcPostalAddress')"
145 And the variable "address" is "{ifc}.by_type('IfcPostalAddress')[0].id()"
146 And I press "bim.enable_editing_address(address={address})"
147 Then nothing happens
148
149 Scenario: Disable editing address
150 Given an empty IFC project
151 When I press "bim.add_person"
152 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
153 And I press "bim.add_address(parent={person}, ifc_class='IfcPostalAddress')"
154 And the variable "address" is "{ifc}.by_type('IfcPostalAddress')[0].id()"
155 And I press "bim.enable_editing_address(address={address})"
156 And I press "bim.disable_editing_address()"
157 Then nothing happens
158
159 Scenario: Edit address
160 Given an empty IFC project
161 When I press "bim.add_person"
162 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
163 And I press "bim.add_address(parent={person}, ifc_class='IfcPostalAddress')"
164 And the variable "address" is "{ifc}.by_type('IfcPostalAddress')[0].id()"
165 And I press "bim.enable_editing_address(address={address})"
166 And I press "bim.edit_address()"
167 Then nothing happens
168
169 Scenario: Add organisation
170 Given an empty IFC project
171 When I press "bim.add_organisation"
172 Then nothing happens
173
174 Scenario: Enable editing organisation
175 Given an empty IFC project
176 When I press "bim.add_organisation"
177 And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
178 And I press "bim.enable_editing_organisation(organisation={organisation})"
179 Then "scene.BIMOwnerProperties.active_organisation_id" is "{organisation}"
180
181 Scenario: Disable editing organisation
182 Given an empty IFC project
183 When I press "bim.add_organisation"
184 And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
185 And I press "bim.enable_editing_organisation(organisation={organisation})"
186 And I press "bim.disable_editing_organisation"
187 Then "scene.BIMOwnerProperties.active_organisation_id" is "0"
188
189 Scenario: Edit organisation
190 Given an empty IFC project
191 When I press "bim.add_organisation"
192 And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
193 And I press "bim.enable_editing_organisation(organisation={organisation})"
194 And I press "bim.edit_organisation"
195 Then "scene.BIMOwnerProperties.active_organisation_id" is "0"
196
197 Scenario: Remove organisation
198 Given an empty IFC project
199 When I press "bim.add_organisation"
200 And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[-1].id()"
201 And I press "bim.remove_organisation(organisation={organisation})"
202 Then nothing happens
203
204 Scenario: Add person and organisation
205 Given an empty IFC project
206 When I press "bim.add_person"
207 And I press "bim.add_organisation"
208 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
209 And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
210 And I press "bim.add_person_and_organisation(person={person}, organisation={organisation})"
211 Then nothing happens
212
213 Scenario: Remove person and organisation
214 Given an empty IFC project
215 When I press "bim.add_person"
216 And I press "bim.add_organisation"
217 And the variable "person" is "{ifc}.by_type('IfcPerson')[-1].id()"
218 And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[-1].id()"
219 And I press "bim.add_person_and_organisation(person={person}, organisation={organisation})"
220 # Note: these are set to -1 temporarily to prevent crashing due to bug #1747
221 And the variable "pno" is "{ifc}.by_type('IfcPersonAndOrganization')[-1].id()"
222 And I press "bim.remove_person_and_organisation(person_and_organisation={pno})"
223 Then nothing happens
224
225 Scenario: Set user
226 Given an empty IFC project
227 When I press "bim.add_person"
228 And I press "bim.add_organisation"
229 And the variable "person" is "{ifc}.by_type('IfcPerson')[0].id()"
230 And the variable "organisation" is "{ifc}.by_type('IfcOrganization')[0].id()"
231 And I press "bim.add_person_and_organisation(person={person}, organisation={organisation})"
232 And the variable "user" is "{ifc}.by_type('IfcPersonAndOrganization')[0].id()"
233 And I press "bim.set_user(user={user})"
234 Then nothing happens
235
236 Scenario: Clear user
237 Given an empty IFC project
238 When I press "bim.clear_user(user={user})"
239 Then nothing happens
240
241 Scenario: Add actor
242 Given an empty IFC project
243 And I press "bim.add_person"
244 When I press "bim.add_actor"
245 Then nothing happens
246
247 Scenario: Remove actor
248 Given an empty IFC project
249 And I press "bim.add_person"
250 And I press "bim.add_actor"
251 And the variable "actor" is "{ifc}.by_type('IfcActor')[-1].id()"
252 When I press "bim.remove_actor(actor={actor})"
253 Then nothing happens
254
255 Scenario: Enable editing actor
256 Given an empty IFC project
257 And I press "bim.add_person"
258 And I press "bim.add_actor"
259 And the variable "actor" is "{ifc}.by_type('IfcActor')[0].id()"
260 When I press "bim.enable_editing_actor(actor={actor})"
261 Then "scene.BIMOwnerProperties.active_actor_id" is "{actor}"
262
263 Scenario: Disable editing actor
264 Given an empty IFC project
265 And I press "bim.add_person"
266 And I press "bim.add_actor"
267 And the variable "actor" is "{ifc}.by_type('IfcActor')[0].id()"
268 And I press "bim.enable_editing_actor(actor={actor})"
269 When I press "bim.disable_editing_actor"
270 Then "scene.BIMOwnerProperties.active_actor_id" is "0"
271
272 Scenario: Edit actor
273 Given an empty IFC project
274 And I press "bim.add_person"
275 And I press "bim.add_actor"
276 And the variable "actor" is "{ifc}.by_type('IfcActor')[0].id()"
277 And I press "bim.enable_editing_actor(actor={actor})"
278 When I press "bim.edit_actor"
279 Then "scene.BIMOwnerProperties.active_actor_id" is "0"
280
281 Scenario: Assign actor
282 Given an empty IFC project
283 And I press "bim.add_person"
284 And I press "bim.add_actor"
285 And I add a cube
286 And the object "Cube" is selected
287 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
288 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
289 And I press "bim.assign_class"
290 And the variable "actor" is "{ifc}.by_type('IfcActor')[0].id()"
291 And the object "IfcWall/Cube" is selected
292 When I press "bim.assign_actor(actor={actor})"
293 Then nothing happens
294
295 Scenario: Unassign actor
296 Given an empty IFC project
297 And I press "bim.add_person"
298 And I press "bim.add_actor"
299 And I add a cube
300 And the object "Cube" is selected
301 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
302 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
303 And I press "bim.assign_class"
304 And the variable "actor" is "{ifc}.by_type('IfcActor')[0].id()"
305 And the object "IfcWall/Cube" is selected
306 And I press "bim.assign_actor(actor={actor})"
307 When I press "bim.unassign_actor(actor={actor})"
308 Then nothing happens