From f580f7255f9a4c7abd4390d364c15021d8b1cc5e Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 11 Aug 2026 16:43:41 +1000 Subject: [PATCH] Type elements are hidden after assignment by default now. So rewrite tests to either use non-types or explicitly select types. --- .../test/bim/feature/classification.feature | 40 +++++++++---------- src/bonsai/test/bim/feature/geometry.feature | 4 ++ src/bonsai/test/bim/feature/material.feature | 13 ++++++ src/bonsai/test/bim/feature/type.feature | 4 ++ 4 files changed, 41 insertions(+), 20 deletions(-) diff --git a/src/bonsai/test/bim/feature/classification.feature b/src/bonsai/test/bim/feature/classification.feature index 7b13afe35b..3b2e056ced 100644 --- a/src/bonsai/test/bim/feature/classification.feature +++ b/src/bonsai/test/bim/feature/classification.feature @@ -72,12 +72,12 @@ Scenario: Add classification reference - object And I press "bim.add_classification" And I add a cube And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType" - And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" + 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 I press "bim.change_classification_level(parent_id={classification})" And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()" - When I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')" + When I press "bim.add_classification_reference(reference={reference}, obj='IfcWall/Cube', obj_type='Object')" Then nothing happens Scenario: Change classification level @@ -88,8 +88,8 @@ Scenario: Change classification level And I press "bim.add_classification" And I add a cube And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType" - And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" + 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 I press "bim.change_classification_level(parent_id={classification})" And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()" @@ -104,8 +104,8 @@ Scenario: Disable editing classification references And I press "bim.add_classification" And I add a cube And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType" - And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" + 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 I press "bim.change_classification_level(parent_id={classification})" When I press "bim.disable_editing_classification_references" @@ -119,12 +119,12 @@ Scenario: Enable editing classification reference And I press "bim.add_classification" And I add a cube And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType" - And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" + 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 I press "bim.change_classification_level(parent_id={classification})" And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()" - And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')" + And I press "bim.add_classification_reference(reference={reference}, obj='IfcWall/Cube', obj_type='Object')" And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()" When I press "bim.enable_editing_classification_reference(reference={reference})" Then nothing happens @@ -137,12 +137,12 @@ Scenario: Disable editing classification reference And I press "bim.add_classification" And I add a cube And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType" - And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" + 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 I press "bim.change_classification_level(parent_id={classification})" And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()" - And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')" + And I press "bim.add_classification_reference(reference={reference}, obj='IfcWall/Cube', obj_type='Object')" And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()" And I press "bim.enable_editing_classification_reference(reference={reference})" When I press "bim.disable_editing_classification_reference" @@ -156,15 +156,15 @@ Scenario: Remove classification reference - object And I press "bim.add_classification" And I add a cube And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType" - And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" + 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 I press "bim.change_classification_level(parent_id={classification})" And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()" - And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')" + And I press "bim.add_classification_reference(reference={reference}, obj='IfcWall/Cube', obj_type='Object')" And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()" And I press "bim.enable_editing_classification_reference(reference={reference})" - When I press "bim.remove_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')" + When I press "bim.remove_classification_reference(reference={reference}, obj='IfcWall/Cube', obj_type='Object')" Then nothing happens Scenario: Edit classification reference @@ -175,12 +175,12 @@ Scenario: Edit classification reference And I press "bim.add_classification" And I add a cube And the object "Cube" is selected - And I set "scene.BIMRootProperties.ifc_product" to "IfcElementType" - And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" + 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 I press "bim.change_classification_level(parent_id={classification})" And the variable "reference" is "{classification_ifc}.by_type('IfcClassificationReference')[0].id()" - And I press "bim.add_classification_reference(reference={reference}, obj='IfcWallType/Cube', obj_type='Object')" + And I press "bim.add_classification_reference(reference={reference}, obj='IfcWall/Cube', obj_type='Object')" And the variable "reference" is "{ifc}.by_type('IfcClassificationReference')[0].id()" And I press "bim.enable_editing_classification_reference(reference={reference})" When I press "bim.edit_classification_reference" diff --git a/src/bonsai/test/bim/feature/geometry.feature b/src/bonsai/test/bim/feature/geometry.feature index 1236f416c8..0708d634ac 100644 --- a/src/bonsai/test/bim/feature/geometry.feature +++ b/src/bonsai/test/bim/feature/geometry.feature @@ -185,6 +185,7 @@ Scenario: Update representation - updating a layered extrusion And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material" @@ -213,6 +214,7 @@ Scenario: Update representation - updating a profiled extrusion And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material" @@ -416,6 +418,7 @@ Scenario: Override duplicate move - copying a layered extrusion And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material" @@ -447,6 +450,7 @@ Scenario: Override duplicate move - copying a profiled extrusion And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material" diff --git a/src/bonsai/test/bim/feature/material.feature b/src/bonsai/test/bim/feature/material.feature index 67525cd8f3..d343cfe9a0 100644 --- a/src/bonsai/test/bim/feature/material.feature +++ b/src/bonsai/test/bim/feature/material.feature @@ -121,6 +121,7 @@ Scenario: Assign material - material layer set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" Then the object "IfcWallType/Empty" does not have the material "Default" @@ -134,6 +135,7 @@ Scenario: Unassign material - material layer set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" When I press "bim.unassign_material" @@ -155,6 +157,7 @@ Scenario: Unassign material - removing inherited material And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" @@ -181,6 +184,7 @@ Scenario: Enable editing assigned material - material layer set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" When I press "bim.enable_editing_assigned_material" @@ -200,6 +204,7 @@ Scenario: Disable editing assigned material - material layer set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material" @@ -220,6 +225,7 @@ Scenario: Edit assigned material - material layer set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material" @@ -235,6 +241,7 @@ Scenario: Assign material - material profile set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected When I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet" And I press "bim.assign_material" Then the object "IfcWallType/Empty" does not have the material "Default" @@ -248,6 +255,7 @@ Scenario: Unassign material - material profile set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet" And I press "bim.assign_material" When I press "bim.unassign_material" @@ -267,6 +275,7 @@ Scenario: Enable editing assigned material - material profile set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet" And I press "bim.assign_material" When I press "bim.enable_editing_assigned_material" @@ -286,6 +295,7 @@ Scenario: Disable editing assigned material - material profile set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material" @@ -306,6 +316,7 @@ Scenario: Edit assigned material - material profile set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material" @@ -454,6 +465,7 @@ Scenario: Add material set layer And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material" @@ -477,6 +489,7 @@ Scenario: Remove material set layer And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" diff --git a/src/bonsai/test/bim/feature/type.feature b/src/bonsai/test/bim/feature/type.feature index 9bae601b30..7fc4abfb44 100644 --- a/src/bonsai/test/bim/feature/type.feature +++ b/src/bonsai/test/bim/feature/type.feature @@ -81,6 +81,7 @@ Scenario: Assign type - assign to a type with a material layer set, which automa And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" When the variable "type" is "{ifc}.by_type('IfcWallType')[0].id()" @@ -102,6 +103,7 @@ Scenario: Assign type - assign to a type with a material layer set, which automa And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" When the variable "type" is "{ifc}.by_type('IfcWallType')[0].id()" @@ -125,6 +127,7 @@ Scenario: Assign type - assign to a different type with a LAYER2 material layer And I press "bim.assign_class" And the variable "type" is "{ifc}.by_type('IfcWallType')[-1].id()" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialLayerSet" And I press "bim.assign_material" And I add an empty @@ -180,6 +183,7 @@ Scenario: Assign type - assign to a type with a material profile set And I set "scene.BIMRootProperties.ifc_class" to "IfcWallType" And I press "bim.assign_class" And I press "bim.add_material()" + And the object "IfcWallType/Empty" is selected And I set "active_object.BIMObjectMaterialProperties.material_type" to "IfcMaterialProfileSet" And I press "bim.assign_material" And I press "bim.enable_editing_assigned_material"