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:
Petru Conduraru
2026-07-23 11:27:58 +03:00
parent 46aa20c0b1
commit 648b493292
+1
View File
@@ -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)