mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 13:52:23 +00:00
fix linked ifc visibility toggle tests
This commit is contained in:
@@ -331,9 +331,13 @@ Scenario: Toggle link visibility - wireframe mode
|
||||
|
||||
Scenario: Toggle link visibility - visible mode
|
||||
Given an empty IFC project
|
||||
And I press "bim.link_ifc(filepath='{cwd}/test/files/basic.blend')"
|
||||
When I press "bim.toggle_link_visibility(link='{cwd}/test/files/basic.blend', mode='VISIBLE')"
|
||||
Then nothing happens
|
||||
And I press "bim.link_ifc(filepath='{cwd}/test/files/basic.ifc')"
|
||||
When I press "bim.toggle_link_visibility(link='{cwd}/test/files/basic.ifc', mode='VISIBLE')"
|
||||
Then "scene.BIMProjectProperties.links['{cwd}/test/files/basic.ifc'].is_hidden" is "True"
|
||||
And the collection "IfcProject/basic.ifc" exclude status is "True"
|
||||
When I press "bim.toggle_link_visibility(link='{cwd}/test/files/basic.ifc', mode='VISIBLE')"
|
||||
Then "scene.BIMProjectProperties.links['{cwd}/test/files/basic.ifc'].is_hidden" is "False"
|
||||
And the collection "IfcProject/basic.ifc" exclude status is "False"
|
||||
|
||||
Scenario: Unload link
|
||||
Given an empty Blender session
|
||||
|
||||
@@ -397,6 +397,21 @@ def the_collection_name_exists(name) -> bpy.types.Collection:
|
||||
return obj
|
||||
|
||||
|
||||
@then(parsers.parse('the collection "{name}" exists in viewlayer'))
|
||||
def the_collection_exists_in_viewlayer(name: str) -> bpy.types.LayerCollection:
|
||||
col = the_collection_name_exists(name)
|
||||
layer = tool.Blender.get_layer_collection(col)
|
||||
if not layer:
|
||||
assert False, f'The collection "{name}" is not present in the current viewlayer'
|
||||
return layer
|
||||
|
||||
|
||||
@then(parsers.parse('the collection "{name}" exclude status is "{exclude}"'))
|
||||
def the_collection_exclude_status_is(name: str, exclude: str) -> None:
|
||||
layer = the_collection_exists_in_viewlayer(name)
|
||||
assert layer.exclude == (exclude == "True")
|
||||
|
||||
|
||||
@then(parsers.parse('the object "{name1}" and "{name2}" are different elements'))
|
||||
def the_object_name1_and_name2_are_different_elements(name1, name2):
|
||||
ifc = an_ifc_file_exists()
|
||||
|
||||
Reference in New Issue
Block a user