Fix tests involving changes in Blender 4.1 (will fail on Blender <4.1)

Basically in Blender 4.1 they've changed a way renaming IDs works if name already existed before and those tests will stop working on Blender <4.1, see https://projects.blender.org/blender/blender/issues/119955
This commit is contained in:
Andrej730
2024-03-27 15:23:46 +05:00
parent e2b22369f1
commit a37c87cf4c
2 changed files with 51 additions and 51 deletions
@@ -477,17 +477,17 @@ Scenario: Override duplicate move - copying walls with mitre joint
And I press "bim.hotkey(hotkey='S_A')"
And the cursor is at "0.5,0,0"
And I press "bim.hotkey(hotkey='S_A')"
And the object "IfcWall/Wall" is selected
And additionally the object "IfcWall/Wall.001" is selected
And the object "IfcWall/Wall.001" is selected
And additionally the object "IfcWall/Wall" is selected
When I press "bim.hotkey(hotkey='S_Y')"
Then the object "IfcWall/Wall.001" dimensions are "0.5,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall" dimensions are "1.1,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.5,0.1,0"
And the object "IfcWall/Wall" top right corner is at "0.6,-1,3"
Then the object "IfcWall/Wall" dimensions are "0.5,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall.001" dimensions are "1.1,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0.1,0"
And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
When I deselect all objects
And the object "IfcWall/Wall" is selected
And additionally the object "IfcWall/Wall.001" is selected
And the object "IfcWall/Wall.001" is selected
And additionally the object "IfcWall/Wall" is selected
When I duplicate the selected objects
Then the object "IfcWall/Wall.002" exists
And the variable "wall_name1" is "[o.name for o in bpy.context.selected_objects if o.name == 'IfcWall/Wall.002'][0]"
+42 -42
View File
@@ -107,11 +107,11 @@ Scenario: Add a wall perpendicular to an existing wall
And I press "bim.hotkey(hotkey='S_A')"
And the cursor is at "0.5,0,0"
When I press "bim.hotkey(hotkey='S_A')"
Then the object "IfcWall/Wall.001" dimensions are "1,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0,0,0"
And the object "IfcWall/Wall" dimensions are "1,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall" top right corner is at "0.6,-1,3"
Then the object "IfcWall/Wall" dimensions are "1,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
And the object "IfcWall/Wall.001" dimensions are "1,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
Scenario: Extend one wall to another
Given an empty IFC project
@@ -122,35 +122,17 @@ Scenario: Extend one wall to another
And I press "bim.hotkey(hotkey='S_A')"
And the cursor is at "0.5,0,0"
And I press "bim.hotkey(hotkey='S_A')"
And the object "IfcWall/Wall" is moved to "0.5,-1,0"
And the object "IfcWall/Wall" is selected
And additionally the object "IfcWall/Wall.001" is selected
And the object "IfcWall/Wall.001" is moved to "0.5,-1,0"
And the object "IfcWall/Wall.001" is selected
And additionally the object "IfcWall/Wall" is selected
When I press "bim.hotkey(hotkey='S_E')"
Then the object "IfcWall/Wall.001" dimensions are "1,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0,0,0"
And the object "IfcWall/Wall" dimensions are "2,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall" top right corner is at "0.6,-2,3"
Then the object "IfcWall/Wall" dimensions are "1,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0,0,0"
And the object "IfcWall/Wall.001" dimensions are "2,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall.001" top right corner is at "0.6,-2,3"
Scenario: Join two walls with a butt joint - first wall has priority
Given an empty IFC project
And I load the demo construction library
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
And I press "bim.hotkey(hotkey='S_A')"
And the cursor is at "0.5,0,0"
And I press "bim.hotkey(hotkey='S_A')"
And the object "IfcWall/Wall" is selected
And additionally the object "IfcWall/Wall.001" is selected
When I press "bim.hotkey(hotkey='S_T')"
Then the object "IfcWall/Wall.001" dimensions are "0.4,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0.6,0,0"
And the object "IfcWall/Wall" dimensions are "1.1,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.5,0.1,0"
And the object "IfcWall/Wall" top right corner is at "0.6,-1,3"
Scenario: Join two walls with a butt joint - second wall has priority
Given an empty IFC project
And I load the demo construction library
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
@@ -162,13 +144,13 @@ Scenario: Join two walls with a butt joint - second wall has priority
And the object "IfcWall/Wall.001" is selected
And additionally the object "IfcWall/Wall" is selected
When I press "bim.hotkey(hotkey='S_T')"
Then the object "IfcWall/Wall.001" dimensions are "0.5,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall" dimensions are "1,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall" top right corner is at "0.6,-1,3"
Then the object "IfcWall/Wall" dimensions are "0.4,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.6,0,0"
And the object "IfcWall/Wall.001" dimensions are "1.1,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0.1,0"
And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
Scenario: Join two walls with a mitre joint
Scenario: Join two walls with a butt joint - second wall has priority
Given an empty IFC project
And I load the demo construction library
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
@@ -179,12 +161,30 @@ Scenario: Join two walls with a mitre joint
And I press "bim.hotkey(hotkey='S_A')"
And the object "IfcWall/Wall" is selected
And additionally the object "IfcWall/Wall.001" is selected
When I press "bim.hotkey(hotkey='S_Y')"
Then the object "IfcWall/Wall.001" dimensions are "0.5,0.1,3"
When I press "bim.hotkey(hotkey='S_T')"
Then the object "IfcWall/Wall" dimensions are "0.5,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall.001" dimensions are "1,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall" dimensions are "1.1,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.5,0.1,0"
And the object "IfcWall/Wall" top right corner is at "0.6,-1,3"
And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
Scenario: Join two walls with a mitre joint
Given an empty IFC project
And I load the demo construction library
And I set "scene.BIMModelProperties.ifc_class" to "IfcWallType"
And the variable "element_type" is "[e for e in {ifc}.by_type('IfcWallType') if e.Name == 'WAL100'][0].id()"
And I set "scene.BIMModelProperties.relating_type_id" to "{element_type}"
And I press "bim.hotkey(hotkey='S_A')"
And the cursor is at "0.5,0,0"
And I press "bim.hotkey(hotkey='S_A')"
And the object "IfcWall/Wall.001" is selected
And additionally the object "IfcWall/Wall" is selected
When I press "bim.hotkey(hotkey='S_Y')"
Then the object "IfcWall/Wall" dimensions are "0.5,0.1,3"
And the object "IfcWall/Wall" bottom left corner is at "0.5,0,0"
And the object "IfcWall/Wall.001" dimensions are "1.1,0.1,3"
And the object "IfcWall/Wall.001" bottom left corner is at "0.5,0.1,0"
And the object "IfcWall/Wall.001" top right corner is at "0.6,-1,3"
Scenario: Change the height of a wall
Given an empty IFC project