| 1 |
@demo |
| 2 |
Feature: Demo |
| 3 |
|
| 4 |
# ############################################################################ # |
| 5 |
|
| 6 |
# Hey there! Welcome to the Bonsai code. Please feel free to reach |
| 7 |
# out if you have any questions or need further guidance. Happy hacking! |
| 8 |
|
| 9 |
# ############################################################################ # |
| 10 |
|
| 11 |
# Note: these tests are commented out as they are for learning purposes only. If |
| 12 |
# you want to run these tests, uncomment it :) |
| 13 |
|
| 14 |
#|# This allows us to write full integration tests that test how all systems work |
| 15 |
#|# as a whole. Whilst other tests focus on portions of the software, these tests |
| 16 |
#|# simulate what happens when a user opens Blender, presses buttons, and does |
| 17 |
#|# things. |
| 18 |
#| |
| 19 |
#|# These tests read like english. You can see all the possible sentences defined |
| 20 |
#|# in test_feature.py. Most of the time, there is already a sentence defined for |
| 21 |
#|# what you want to test. |
| 22 |
#| |
| 23 |
#|# Every operator has at least one scenario associated with it to test it. |
| 24 |
#|Scenario: Demonstrate hello world |
| 25 |
#| Given an empty IFC project |
| 26 |
#| When I press "bim.demonstrate_hello_world" |
| 27 |
#| # Blender doesn't have a way of testing that things are visible in the |
| 28 |
#| # interface and layout. We can check properties, and what's in the 3D |
| 29 |
#| # scenegraph, but not layout. There is no "DOM" like in web applications. |
| 30 |
#| # Too bad, we can't check the results, but we still write the test, that way |
| 31 |
#| # we can still check for errors like crashes or Python errors, like a "smoke |
| 32 |
#| # test". |
| 33 |
#| Then nothing happens |
| 34 |
#| |
| 35 |
#|# This operator has two scenarios because there are two possibilities of a user |
| 36 |
#|# interacting with it. |
| 37 |
#|Scenario: Demonstrate rename project - with a name provided |
| 38 |
#| Given an empty IFC project |
| 39 |
#| When I set "scene.BIMDemoProperties.name" to "Foobar" |
| 40 |
#| And I press "bim.demonstrate_rename_project" |
| 41 |
#| Then the object "IfcProject/Foobar" is an "IfcProject" |
| 42 |
#| |
| 43 |
#|# This is the other possible scenario for the rename project operator. |
| 44 |
#|Scenario: Demonstrate rename project - with no name |
| 45 |
#| Given an empty IFC project |
| 46 |
#| When I set "scene.BIMDemoProperties.name" to "" |
| 47 |
#| And I press "bim.demonstrate_rename_project" |
| 48 |
#| Then the object "IfcProject/My Project" is an "IfcProject" |