From 0e45270b37cb246690b3d471b4f44595c2494cff Mon Sep 17 00:00:00 2001 From: anibalinn Date: Wed, 2 Oct 2024 16:30:42 -0300 Subject: [PATCH] Adding the possibility to copy the scenario name in the HTML report. Also, fixing the features path generation --- CHANGES.rst | 3 ++- behavex/__init__.py | 2 +- behavex/outputs/bootstrap/css/behavex.css | 3 +++ behavex/outputs/jinja/main.jinja2 | 12 ++++++------ behavex/runner.py | 2 +- pyproject.toml | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 286bb1c..cddd3c4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,9 +8,10 @@ ENHANCEMENTS: * Improved KeyboardInterrupt handling when running BehaveX in parallel, by terminating all child processes before exiting. * Simplified library documentation (README.md) * Added more tests to validate BehaveX is working as expected when using latest stable Behave version (1.2.6) +* Adding the possibility to copy the scenario name in the HTML report FIXES: - +* Fix done when generating be features path (if not specified, BehaveX will use the current path as features path) * Fix done when managing tags in scenario outlines * Fix done when analyzing empty features diff --git a/behavex/__init__.py b/behavex/__init__.py index 567658b..7bec66f 100644 --- a/behavex/__init__.py +++ b/behavex/__init__.py @@ -10,4 +10,4 @@ # Set the framework path os.environ['BEHAVEX_PATH'] = os.path.dirname(os.path.realpath(__file__)) # Set the features path -os.environ['FEATURES_PATH'] = os.environ.get('FEATURES_PATH', os.path.join(os.getcwd(), 'features')) +os.environ['FEATURES_PATH'] = os.environ.get('FEATURES_PATH', os.path.abspath(os.path.join('.', 'features'))) diff --git a/behavex/outputs/bootstrap/css/behavex.css b/behavex/outputs/bootstrap/css/behavex.css index 10b7b3f..3730015 100644 --- a/behavex/outputs/bootstrap/css/behavex.css +++ b/behavex/outputs/bootstrap/css/behavex.css @@ -118,6 +118,9 @@ table th { .glyphicon-sort { font-size: 10px } +.glyphicon-scenario { + font-size: 11px +} .table { margin-bottom: 5px; background-color: #F7F7F7; diff --git a/behavex/outputs/jinja/main.jinja2 b/behavex/outputs/jinja/main.jinja2 index 3bd6c3e..391e1fe 100644 --- a/behavex/outputs/jinja/main.jinja2 +++ b/behavex/outputs/jinja/main.jinja2 @@ -296,16 +296,16 @@   - {{scenario.name|e}} + {{scenario.name|e}} +   {%- if ('MUTE' in scenario|get_scenario_tags) -%} -   - +   {%- endif -%} {% if scenario.retried is defined %} - +   {% endif %}