mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 11:43:53 +00:00
test features
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
@root
|
||||
Feature: Search
|
||||
|
||||
Scenario: Select all walls
|
||||
Given an empty IFC project
|
||||
And I add a cube
|
||||
When the object "Cube" is selected
|
||||
And I set "scene.BIMRootProperties.ifc_class" to "IfcWall"
|
||||
And I press "bim.assign_class"
|
||||
And I add a new group to IfcSelector
|
||||
And I add a new query to IfcSelector
|
||||
And I set "scene.IfcSelectorProperties.groups[0].queries[0].active_option" to "IFC Class"
|
||||
And I set "scene.IfcSelectorProperties.groups[0].queries[0].active_option" to "124: IfcWall"
|
||||
And I press 'bim.filter_model_elements'
|
||||
Then bpy.context.selected_objects should contain "Cube"
|
||||
|
||||
@@ -98,6 +98,15 @@ def i_add_a_sun():
|
||||
def i_add_a_material():
|
||||
bpy.context.active_object.active_material = bpy.data.materials.new("Material")
|
||||
|
||||
@given("I add a new group to IfcSelector")
|
||||
@when("I add a new group to IfcSelector")
|
||||
def i_add_a_new_collection_item():
|
||||
bpy.data.scenes["Scene"].IfcSelectorProperties.groups.add()
|
||||
|
||||
@given("I add a new query to IfcSelector")
|
||||
@when("I add a new query to IfcSelector")
|
||||
def i_add_a_new_collection_item():
|
||||
bpy.data.scenes["Scene"].IfcSelectorProperties.groups[0].queries.add()
|
||||
|
||||
@given(parsers.parse('the material "{name}" colour is set to "{colour}"'))
|
||||
@when(parsers.parse('the material "{name}" colour is set to "{colour}"'))
|
||||
|
||||
Reference in New Issue
Block a user