From 379d6d93920e1bc85a3874db6d87e1f91fb8aa54 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 15 Mar 2022 16:53:31 +1100 Subject: [PATCH] Minor fix --- src/blenderbim/test/bim/feature/aggregate.feature | 2 +- src/blenderbim/test/bim/feature/geometry.feature | 4 ++-- src/blenderbim/test/bim/feature/model.feature | 2 +- src/blenderbim/test/bim/feature/root.feature | 2 +- src/blenderbim/test/tool/test_style.py | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/blenderbim/test/bim/feature/aggregate.feature b/src/blenderbim/test/bim/feature/aggregate.feature index 3d0d15d1ba..acb7197252 100644 --- a/src/blenderbim/test/bim/feature/aggregate.feature +++ b/src/blenderbim/test/bim/feature/aggregate.feature @@ -49,7 +49,7 @@ Scenario: Add aggregate When I press "bim.add_aggregate" Then the object "IfcWall/Cube" is in the collection "IfcElementAssembly/Assembly" And the object "IfcElementAssembly/Assembly" is in the collection "IfcElementAssembly/Assembly" - And the collection "IfcElementAssembly/Assembly" is in the collection "IfcProject/My Project" + And the collection "IfcElementAssembly/Assembly" is in the collection "IfcBuildingStorey/My Storey" Scenario: Add aggregate - with the aggregate inheriting the existing spatial collection Given an empty IFC project diff --git a/src/blenderbim/test/bim/feature/geometry.feature b/src/blenderbim/test/bim/feature/geometry.feature index 5bf3491be0..793f499503 100644 --- a/src/blenderbim/test/bim/feature/geometry.feature +++ b/src/blenderbim/test/bim/feature/geometry.feature @@ -19,7 +19,7 @@ Scenario: Add representation And I press "bim.assign_class" And the object "IfcWall/Cube" is selected Then the object "IfcWall/Cube" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW" - When the variable "context" is "{ifc}.by_type('IfcGeometricRepresentationSubContext')[-1].id()" + When the variable "context" is "[c for c in {ifc}.by_type('IfcGeometricRepresentationSubContext') if c.TargetView == 'PLAN_VIEW'][0].id()" And I set "scene.BIMRootProperties.contexts" to "{context}" And I press "bim.add_representation" Then the object "IfcWall/Cube" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW" @@ -36,7 +36,7 @@ Scenario: Add representation - add a new representation to a typed instance Then the object "IfcWall/Wall" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW" And the object "IfcWall/Wall.001" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW" When the object "IfcWall/Wall" is selected - And the variable "context" is "{ifc}.by_type('IfcGeometricRepresentationSubContext')[-1].id()" + And the variable "context" is "[c for c in {ifc}.by_type('IfcGeometricRepresentationSubContext') if c.TargetView == 'PLAN_VIEW'][0].id()" And I set "scene.BIMRootProperties.contexts" to "{context}" And I press "bim.add_representation" Then the object "IfcWall/Wall" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW" diff --git a/src/blenderbim/test/bim/feature/model.feature b/src/blenderbim/test/bim/feature/model.feature index 4a22b908c1..49b85e9641 100644 --- a/src/blenderbim/test/bim/feature/model.feature +++ b/src/blenderbim/test/bim/feature/model.feature @@ -40,7 +40,7 @@ Scenario: Add type instance - add a mesh where existing instances have changed c And I press "bim.add_type_instance" And the object "IfcWall/Wall" data is a "Tessellation" representation of "Model/Body/MODEL_VIEW" And the object "IfcWall/Wall" is selected - And the variable "context" is "{ifc}.by_type('IfcGeometricRepresentationSubContext')[-1].id()" + And the variable "context" is "[c for c in {ifc}.by_type('IfcGeometricRepresentationSubContext') if c.TargetView == 'PLAN_VIEW'][0].id()" And I set "scene.BIMRootProperties.contexts" to "{context}" And I press "bim.add_representation" And the object "IfcWall/Wall" data is a "Annotation2D" representation of "Plan/Annotation/PLAN_VIEW" diff --git a/src/blenderbim/test/bim/feature/root.feature b/src/blenderbim/test/bim/feature/root.feature index e9477fe668..6d3bc39226 100644 --- a/src/blenderbim/test/bim/feature/root.feature +++ b/src/blenderbim/test/bim/feature/root.feature @@ -43,7 +43,7 @@ Scenario: Assign a class to a cube And I set "scene.BIMRootProperties.ifc_class" to "IfcWall" And I press "bim.assign_class" Then the object "IfcWall/Cube" is an "IfcWall" - And the object "IfcWall/Cube" is in the collection "IfcProject/My Project" + And the object "IfcWall/Cube" is in the collection "IfcBuildingStorey/My Storey" And the object "IfcWall/Cube" has a "Tessellation" representation of "Model/Body/MODEL_VIEW" Scenario: Assign a type class to a cube diff --git a/src/blenderbim/test/tool/test_style.py b/src/blenderbim/test/tool/test_style.py index b1fc859453..977f9d4fe3 100644 --- a/src/blenderbim/test/tool/test_style.py +++ b/src/blenderbim/test/tool/test_style.py @@ -116,6 +116,7 @@ class TestGetSurfaceRenderingAttributes(NewFile): "Green": 0.5, "Blue": 0.5, }, + "SpecularColour": 0.0, "SpecularHighlight": {"IfcSpecularRoughness": 0.2}, "ReflectanceMethod": "NOTDEFINED", }