mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Bonsai tests: register 'I evaluate expression' for Then steps
The 'Edit layer item defaults null IsVentilated to FALSE in UI' scenario ends with 'Then I evaluate expression ...', but the step was only registered with @given/@when, so once the material assignment bug was fixed the scenario failed with StepDefinitionNotFoundError. The earlier IndexError had been masking this. Register the step for Then like the neighbouring 'the variable' step already is. This change was made with the assistance of an AI tool.
This commit is contained in:
@@ -979,6 +979,7 @@ def i_click_button_and_expect_error_error_msg(button, error_msg):
|
||||
|
||||
@given(parsers.parse('I evaluate expression "{expression}"'))
|
||||
@when(parsers.parse('I evaluate expression "{expression}"'))
|
||||
@then(parsers.parse('I evaluate expression "{expression}"'))
|
||||
def i_evaluate_expression(expression):
|
||||
expression = replace_variables(expression)
|
||||
exec(expression)
|
||||
|
||||
Reference in New Issue
Block a user