Debian Codegraph @

src/bonsai/test/bim/feature/attribute.feature

raw
1 @attribute
2 Feature: Attribute
3
4 Scenario: Enable editing attributes
5 Given an empty IFC project
6 And the object "IfcSite/My Site" is selected
7 When I press "bim.enable_editing_attributes(obj='IfcSite/My Site')"
8 Then nothing happens
9
10 Scenario: Disable editing attributes
11 Given an empty IFC project
12 And the object "IfcSite/My Site" is selected
13 And I press "bim.enable_editing_attributes(obj='IfcSite/My Site')"
14 When I press "bim.disable_editing_attributes(obj='IfcSite/My Site')"
15 Then nothing happens
16
17 Scenario: Edit attributes
18 Given an empty IFC project
19 And the object "IfcSite/My Site" is selected
20 And I press "bim.enable_editing_attributes(obj='IfcSite/My Site')"
21 And I set "active_object.BIMAttributeProperties.attributes[1].string_value" to "Name"
22 When I press "bim.edit_attributes"
23 Then the object "IfcSite/Name" is an "IfcSite"
24 And the object "IfcSite/My Site" does not exist
25
26 Scenario: Edit attributes - longitude / latitude
27 Given an empty IFC project
28 And the object "IfcSite/My Site" is selected
29 And I press "bim.enable_editing_attributes(obj='IfcSite/My Site')"
30 Then "active_object.BIMAttributeProperties.attributes[6].name" is "RefLatitude"
31 When I set "active_object.BIMAttributeProperties.attributes[6].string_value" to "[1,2]"
32 And I press "bim.edit_attributes"
33 And I press "bim.enable_editing_attributes(obj='IfcSite/My Site')"
34 And I press "bim.edit_attributes"
35 Then nothing happens
36
37 Scenario: Copy attribute to selected
38 Given an empty IFC project
39 And I add a cube
40 And the object "Cube" is selected
41 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
42 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
43 And I press "bim.assign_class"
44 And I add a cube
45 And the object "Cube" is selected
46 And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
47 And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
48 And I press "bim.assign_class"
49 And the object "IfcWall/Cube" is selected
50 And additionally the object "IfcWall/Cube.001" is selected
51 And I press "bim.enable_editing_attributes(obj='IfcWall/Cube.001')"
52 And I set "active_object.BIMAttributeProperties.attributes[2].string_value" to "Foo"
53 When I press "bim.copy_attribute_to_selection(name='Description')"
54 Then nothing happens