From 648b4932925eb29bfcf742aef803fdec9c2fc232 Mon Sep 17 00:00:00 2001 From: Petru Conduraru Date: Thu, 23 Jul 2026 11:27:58 +0300 Subject: [PATCH] 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. --- src/bonsai/test/bim/test_feature.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bonsai/test/bim/test_feature.py b/src/bonsai/test/bim/test_feature.py index 39a4d7710a..ff96aa6562 100644 --- a/src/bonsai/test/bim/test_feature.py +++ b/src/bonsai/test/bim/test_feature.py @@ -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)