mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
test_feature - use common prompts for loading/saving temp projects
This commit is contained in:
@@ -352,9 +352,8 @@ Scenario: Override duplicate move - copying a coloured representation
|
||||
And the variable "style" is "{ifc}.by_type('IfcSurfaceStyle')[0].id()"
|
||||
And I press "bim.assign_style_to_selected(style_id={style})"
|
||||
When I duplicate the selected objects
|
||||
And I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And an empty Blender session is started
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc', should_start_fresh_session=False)"
|
||||
And I save IFC project
|
||||
And I load previously saved IFC project
|
||||
Then the material "Style" colour is "1,0,0,1"
|
||||
And the object "IfcWall/Cube" has the material "Style"
|
||||
And the object "IfcWall/Cube.001" has the material "Style"
|
||||
|
||||
@@ -833,20 +833,21 @@ Scenario: Unlink IFC
|
||||
|
||||
Scenario: Export IFC - blank project
|
||||
Given an empty IFC project
|
||||
When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
When I save IFC project
|
||||
Then nothing happens
|
||||
|
||||
Scenario: Export IFC - with basic contents
|
||||
Given an empty Blender session
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')"
|
||||
When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
Then "scene.BIMProperties.ifc_file" is "{cwd}/test/files/temp/export.ifc"
|
||||
When I save IFC project
|
||||
Then "scene.BIMProperties.ifc_file" is "{temp_project_path}"
|
||||
|
||||
Scenario: Export IFC - with basic contents and saving as another file
|
||||
Given an empty Blender session
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')"
|
||||
When I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc', should_save_as=True)"
|
||||
Then "scene.BIMProperties.ifc_file" is "{cwd}/test/files/temp/export.ifc"
|
||||
When I save IFC project
|
||||
When I press "bim.save_project(filepath='{temp_project_path}', should_save_as=True)"
|
||||
Then "scene.BIMProperties.ifc_file" is "{temp_project_path}"
|
||||
|
||||
Scenario: Export IFC - with basic contents and saving as IfcJSON where import is not supported
|
||||
Given an empty Blender session
|
||||
@@ -877,26 +878,23 @@ Scenario: Export IFC - with deleted objects synchronised
|
||||
And the object "IfcBuildingStorey/My Storey" is selected
|
||||
And I set the "is_locked" property to "FALSE"
|
||||
And I delete the selected objects
|
||||
And I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And an empty Blender session is started
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And I save IFC project
|
||||
And I load previously saved IFC project
|
||||
Then the object "IfcBuildingStorey/My Storey" does not exist
|
||||
|
||||
Scenario: Export IFC - with moved object location synchronised
|
||||
Given an empty IFC project
|
||||
When the object "IfcBuildingStorey/My Storey" is moved to "0,0,1"
|
||||
And I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And an empty Blender session is started
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And I save IFC project
|
||||
And I load previously saved IFC project
|
||||
Then the object "IfcBuildingStorey/My Storey" is at "0,0,1"
|
||||
|
||||
Scenario: Export IFC - with moved grid axis location synchronised
|
||||
Given an empty IFC project
|
||||
And I press "mesh.add_grid"
|
||||
When the object "IfcGridAxis/01" is moved to "1,0,0"
|
||||
And I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And an empty Blender session is started
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And I save IFC project
|
||||
And I load previously saved IFC project
|
||||
Then the object "IfcGridAxis/01" bottom left corner is at "1,-2,0"
|
||||
|
||||
Scenario: Export IFC - with changed object scale ignored
|
||||
@@ -909,7 +907,6 @@ Scenario: Export IFC - with changed object scale ignored
|
||||
And I click "Assign IFC Class"
|
||||
And the object "IfcWall/Cube" is selected
|
||||
When the object "IfcWall/Cube" is scaled to "2"
|
||||
And I press "bim.save_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And an empty Blender session is started
|
||||
And I press "bim.load_project(filepath='{cwd}/test/files/temp/export.ifc')"
|
||||
And I save IFC project
|
||||
And I load previously saved IFC project
|
||||
Then the object "IfcWall/Cube" dimensions are "2,2,2"
|
||||
|
||||
Reference in New Issue
Block a user