mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Fix cost and drawing feature tests
This commit is contained in:
@@ -8,8 +8,12 @@ Scenario: Duplicate drawing
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the variable "wall1" is "IfcStore.get_file().by_type('IfcWall')[-1].id()"
|
||||
And I press "bim.add_drawing"
|
||||
And I save sample test files
|
||||
And I look at the "Drawings" panel
|
||||
And I click "IMPORT"
|
||||
And I click "ADD"
|
||||
And I press "bim.expand_target_view(target_view='PLAN_VIEW')"
|
||||
When I select the "PLAN_VIEW" item in the "BIM_UL_drawinglist" list
|
||||
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
|
||||
When I press "bim.duplicate_drawing(drawing={drawing})"
|
||||
Then nothing happens
|
||||
@@ -21,12 +25,14 @@ Scenario: Create drawing
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the variable "wall1" is "IfcStore.get_file().by_type('IfcWall')[-1].id()"
|
||||
And I press "bim.add_drawing"
|
||||
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
|
||||
And I set "scene.DocProperties.active_drawing_index" to "0"
|
||||
And I press "bim.activate_drawing(drawing={drawing})"
|
||||
When I press "bim.create_drawing"
|
||||
And I save sample test files
|
||||
And I look at the "Drawings" panel
|
||||
And I click "IMPORT"
|
||||
And I click "ADD"
|
||||
And I press "bim.expand_target_view(target_view='PLAN_VIEW')"
|
||||
When I select the "PLAN_VIEW" item in the "BIM_UL_drawinglist" list
|
||||
And I click "OUTLINER_OB_CAMERA"
|
||||
And I click "OUTPUT"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Create drawing after deleting a duplicated object
|
||||
@@ -36,19 +42,18 @@ Scenario: Create drawing after deleting a duplicated object
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the variable "wall1" is "IfcStore.get_file().by_type('IfcWall')[-1].id()"
|
||||
And I press "bim.copy_class(obj='IfcWall/Cube')"
|
||||
And the variable "wall2" is "IfcStore.get_file().by_type('IfcWall')[-1].id()"
|
||||
And I press "bim.load_drawings"
|
||||
# And I set "scene.DocProperties.location_hint" to "('My Storey', 'My Storey', '')"
|
||||
And I press "bim.add_drawing"
|
||||
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
|
||||
And I set "scene.DocProperties.active_drawing_index" to "0"
|
||||
And I press "bim.activate_drawing(drawing={drawing})"
|
||||
And I press "bim.create_drawing"
|
||||
And I duplicate the selected objects
|
||||
And I save sample test files
|
||||
And I look at the "Drawings" panel
|
||||
And I click "IMPORT"
|
||||
And I click "ADD"
|
||||
And I press "bim.expand_target_view(target_view='PLAN_VIEW')"
|
||||
And I select the "PLAN_VIEW" item in the "BIM_UL_drawinglist" list
|
||||
And I click "OUTLINER_OB_CAMERA"
|
||||
And I click "OUTPUT"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
And I press "object.delete(use_global=False)"
|
||||
When I press "bim.create_drawing"
|
||||
And I delete the selected objects
|
||||
When I click "OUTPUT"
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Activate drawing preserves visibility for non-ifc objects
|
||||
@@ -57,10 +62,13 @@ Scenario: Activate drawing preserves visibility for non-ifc objects
|
||||
And I add a cube
|
||||
And the object "Cube" is visible
|
||||
And the object "Cube.001" is not visible
|
||||
And I press "bim.add_drawing"
|
||||
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
|
||||
And I set "scene.DocProperties.active_drawing_index" to "0"
|
||||
When I press "bim.activate_drawing(drawing={drawing})"
|
||||
And I save sample test files
|
||||
And I look at the "Drawings" panel
|
||||
And I click "IMPORT"
|
||||
And I click "ADD"
|
||||
And I press "bim.expand_target_view(target_view='PLAN_VIEW')"
|
||||
And I select the "PLAN_VIEW" item in the "BIM_UL_drawinglist" list
|
||||
And I click "OUTLINER_OB_CAMERA"
|
||||
Then the object "Cube" is visible
|
||||
And the object "Cube.001" is not visible
|
||||
|
||||
@@ -68,10 +76,13 @@ Scenario: Activate drawing preserves selection
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
And the object "Cube" is selected
|
||||
And I press "bim.add_drawing"
|
||||
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
|
||||
And I set "scene.DocProperties.active_drawing_index" to "0"
|
||||
When I press "bim.activate_drawing(drawing={drawing})"
|
||||
And I save sample test files
|
||||
And I look at the "Drawings" panel
|
||||
And I click "IMPORT"
|
||||
And I click "ADD"
|
||||
And I press "bim.expand_target_view(target_view='PLAN_VIEW')"
|
||||
And I select the "PLAN_VIEW" item in the "BIM_UL_drawinglist" list
|
||||
When I click "OUTLINER_OB_CAMERA"
|
||||
Then the object "Cube" is selected
|
||||
|
||||
Scenario: Remove drawing
|
||||
@@ -81,10 +92,14 @@ Scenario: Remove drawing
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the variable "wall1" is "IfcStore.get_file().by_type('IfcWall')[-1].id()"
|
||||
And I press "bim.add_drawing"
|
||||
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
|
||||
And the collection "IfcAnnotation/PLAN_VIEW" exists
|
||||
And I save sample test files
|
||||
And I look at the "Drawings" panel
|
||||
And I click "IMPORT"
|
||||
And I click "ADD"
|
||||
And I press "bim.expand_target_view(target_view='PLAN_VIEW')"
|
||||
And I select the "PLAN_VIEW" item in the "BIM_UL_drawinglist" list
|
||||
When I click "OUTLINER_OB_CAMERA"
|
||||
Then the collection "IfcAnnotation/PLAN_VIEW" exists
|
||||
When I press "bim.remove_drawing(drawing={drawing})"
|
||||
Then the collection "IfcAnnotation/PLAN_VIEW" does not exist
|
||||
|
||||
@@ -95,7 +110,6 @@ Scenario: Remove drawing - via object deletion
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the variable "wall1" is "IfcStore.get_file().by_type('IfcWall')[-1].id()"
|
||||
And I press "bim.add_drawing"
|
||||
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
|
||||
And the collection "IfcAnnotation/PLAN_VIEW" exists
|
||||
@@ -110,12 +124,13 @@ Scenario: Remove drawing - deleting active drawing
|
||||
And I set "scene.BIMRootProperties.ifc_product" to "IfcElement"
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And the variable "wall1" is "IfcStore.get_file().by_type('IfcWall')[-1].id()"
|
||||
And I press "bim.add_drawing"
|
||||
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
|
||||
And the collection "IfcAnnotation/PLAN_VIEW" exists
|
||||
And I set "scene.DocProperties.active_drawing_index" to "0"
|
||||
And I press "bim.activate_drawing(drawing={drawing})"
|
||||
And I save sample test files
|
||||
And I look at the "Drawings" panel
|
||||
And I click "IMPORT"
|
||||
And I click "ADD"
|
||||
And I press "bim.expand_target_view(target_view='PLAN_VIEW')"
|
||||
And I select the "PLAN_VIEW" item in the "BIM_UL_drawinglist" list
|
||||
And I click "OUTLINER_OB_CAMERA"
|
||||
When the object "IfcAnnotation/PLAN_VIEW" is selected
|
||||
And I press "bim.override_object_delete"
|
||||
And I delete the selected objects
|
||||
Then the collection "IfcAnnotation/PLAN_VIEW" does not exist
|
||||
|
||||
Reference in New Issue
Block a user