Deprecate auto detection of vendor workarounds as no longer necessary.

This commit is contained in:
Dion Moult
2021-09-12 19:19:53 +10:00
parent 92adeca837
commit 2a07f7082a
9 changed files with 166 additions and 100 deletions
@@ -42,7 +42,33 @@ class TestLoadProject(test.bim.bootstrap.NewFile):
return """
When I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')"
Then an IFC file exists
And the object "IfcProject/My Project" is an "IfcProject"
And the object "IfcSite/My Site" is an "IfcSite"
And the object "IfcBuilding/My Building" is an "IfcBuilding"
And the object "IfcBuildingStorey/Ground Floor" is an "IfcBuildingStorey"
And the object "IfcBuildingStorey/Level 1" is an "IfcBuildingStorey"
And the object "IfcSlab/Slab" is an "IfcSlab"
And the object "IfcWall/Wall" is an "IfcWall"
And the object "IfcElementAssembly/Empty" is an "IfcElementAssembly"
And the object "IfcBeam/Beam" is an "IfcBeam"
And the object "IfcSite/My Site" is in the collection "IfcSite/My Site"
And the object "IfcBuilding/My Building" is in the collection "IfcBuilding/My Building"
And the object "IfcBuildingStorey/Ground Floor" is in the collection "IfcBuildingStorey/Ground Floor"
And the object "IfcBuildingStorey/Level 1" is in the collection "IfcBuildingStorey/Level 1"
And the object "IfcElementAssembly/Empty" is in the collection "IfcElementAssembly/Empty"
And the object "IfcBeam/Beam" is in the collection "IfcElementAssembly/Empty"
And the object "IfcSlab/Slab" is in the collection "IfcBuildingStorey/Ground Floor"
And the object "IfcWall/Wall" is in the collection "IfcBuildingStorey/Level 1"
And "scene.BIMProjectProperties.is_loading" is "False"
"""
@test.bim.bootstrap.scenario
def test_loading_a_project_in_advanced_mode(self):
return """
When I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc', is_advanced=True)"
Then an IFC file exists
And "scene.BIMProjectProperties.is_loading" is "True"
And the object "IfcProject/My Project" does not exist
"""
@@ -50,7 +76,7 @@ class TestLoadProjectElements(test.bim.bootstrap.NewFile):
@test.bim.bootstrap.scenario
def test_loading_all_project_elements(self):
return """
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')"
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.collection_mode" to "DECOMPOSITION"
And I set "scene.BIMProjectProperties.filter_mode" to "NONE"
And I press "bim.load_project_elements"
@@ -77,7 +103,7 @@ class TestLoadProjectElements(test.bim.bootstrap.NewFile):
@test.bim.bootstrap.scenario
def test_loading_objects_filtered_by_decomposition(self):
return """
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')"
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.collection_mode" to "DECOMPOSITION"
And I set "scene.BIMProjectProperties.filter_mode" to "DECOMPOSITION"
Then "scene.BIMProjectProperties.filter_categories['IfcSite/My Site'].total_elements" is "0"
@@ -106,7 +132,7 @@ class TestLoadProjectElements(test.bim.bootstrap.NewFile):
@test.bim.bootstrap.scenario
def test_loading_objects_filtered_by_ifc_class(self):
return """
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')"
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.collection_mode" to "DECOMPOSITION"
And I set "scene.BIMProjectProperties.filter_mode" to "IFC_CLASS"
Then "scene.BIMProjectProperties.filter_categories['IfcWall'].total_elements" is "1"
@@ -126,10 +152,56 @@ class TestLoadProjectElements(test.bim.bootstrap.NewFile):
And the object "IfcWall/Wall" does not exist
"""
@test.bim.bootstrap.scenario
def test_loading_objects_filtered_by_whitelist(self):
return """
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.collection_mode" to "DECOMPOSITION"
And I set "scene.BIMProjectProperties.filter_mode" to "WHITELIST"
And I set "scene.BIMProjectProperties.filter_query" to ".IfcSlab"
And I press "bim.load_project_elements"
Then the object "IfcProject/My Project" is an "IfcProject"
And the object "IfcSite/My Site" is an "IfcSite"
And the object "IfcBuilding/My Building" is an "IfcBuilding"
And the object "IfcBuildingStorey/Ground Floor" is an "IfcBuildingStorey"
And the object "IfcSlab/Slab" is an "IfcSlab"
And the object "IfcSite/My Site" is in the collection "IfcSite/My Site"
And the object "IfcBuilding/My Building" is in the collection "IfcBuilding/My Building"
And the object "IfcBuildingStorey/Ground Floor" is in the collection "IfcBuildingStorey/Ground Floor"
And the object "IfcSlab/Slab" is in the collection "IfcBuildingStorey/Ground Floor"
And the object "IfcBuildingStorey/Level 1" does not exist
And the object "IfcWall/Wall" does not exist
"""
@test.bim.bootstrap.scenario
def test_loading_objects_filtered_by_blacklist(self):
return """
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.collection_mode" to "DECOMPOSITION"
And I set "scene.BIMProjectProperties.filter_mode" to "BLACKLIST"
And I set "scene.BIMProjectProperties.filter_query" to ".IfcSlab"
And I press "bim.load_project_elements"
Then the object "IfcProject/My Project" is an "IfcProject"
And the object "IfcSite/My Site" is an "IfcSite"
And the object "IfcBuilding/My Building" is an "IfcBuilding"
And the object "IfcBuildingStorey/Level 1" is an "IfcBuildingStorey"
And the object "IfcWall/Wall" is an "IfcWall"
And the object "IfcElementAssembly/Empty" is an "IfcElementAssembly"
And the object "IfcBeam/Beam" is an "IfcBeam"
And the object "IfcSite/My Site" is in the collection "IfcSite/My Site"
And the object "IfcBuilding/My Building" is in the collection "IfcBuilding/My Building"
And the object "IfcBuildingStorey/Level 1" is in the collection "IfcBuildingStorey/Level 1"
And the object "IfcWall/Wall" is in the collection "IfcBuildingStorey/Level 1"
And the object "IfcElementAssembly/Empty" is in the collection "IfcElementAssembly/Empty"
And the object "IfcBeam/Beam" is in the collection "IfcElementAssembly/Empty"
And the object "IfcBuildingStorey/Ground Floor" does not exist
And the object "IfcSlab/Slab" does not exist
"""
@test.bim.bootstrap.scenario
def test_loading_no_objects_due_to_filter(self):
return """
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')"
Given I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.collection_mode" to "DECOMPOSITION"
And I set "scene.BIMProjectProperties.filter_mode" to "IFC_CLASS"
And I press "bim.load_project_elements"
@@ -142,12 +214,22 @@ class TestLoadProjectElements(test.bim.bootstrap.NewFile):
And the object "IfcWall/Wall" does not exist
"""
@test.bim.bootstrap.scenario
def test_manual_offset_of_object_placements(self):
return """
Given I press "bim.load_project(filepath='{cwd}/test/files/manual-geolocation.ifc', is_advanced=True)"
When I set "scene.BIMProjectProperties.should_offset_model" to "True"
And I set "scene.BIMProjectProperties.model_offset_coordinates" to "-268388.5, -5774506.0, -21.899999618530273"
And I press "bim.load_project_elements"
Then the object "IfcPlate/1780 x 270 PRECAST WALL" is at "0,0,0"
"""
class TestUnloadProject(test.bim.bootstrap.NewFile):
@test.bim.bootstrap.scenario
def test_unloading_a_project(self):
return """
When I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc')"
When I press "bim.load_project(filepath='{cwd}/test/files/basic.ifc', is_advanced=True)"
And I press "bim.unload_project"
Then an IFC file does not exist
And "scene.BIMProjectProperties.is_loading" is "False"