Skip to content

Commit

Permalink
Adding the possibility to copy the scenario name in the HTML report. …
Browse files Browse the repository at this point in the history
…Also, fixing the features path generation
  • Loading branch information
anibalinn committed Oct 2, 2024
1 parent c7ef2df commit 0e45270
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion behavex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')))
3 changes: 3 additions & 0 deletions behavex/outputs/bootstrap/css/behavex.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ table th {
.glyphicon-sort {
font-size: 10px
}
.glyphicon-scenario {
font-size: 11px
}
.table {
margin-bottom: 5px;
background-color: #F7F7F7;
Expand Down
12 changes: 6 additions & 6 deletions behavex/outputs/jinja/main.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -296,16 +296,16 @@
 
<span class="glyphicon glyphicon-menu-right" data-id-hash="{{ scenario.id_hash }}"
title="{{ ('commons.expand'|get_text).format('scenario') }}" data-scenario>
<b class="span-behavex">{{scenario.name|e}}</b>
<b class="span-behavex" style="cursor: pointer;">{{scenario.name|e}}</b>
&nbsp;<b class="glyphicon glyphicon-duplicate glyphicon-scenario link-cursor" title="Copy scenario name"
onclick="copyToClipboard('{{scenario.name|e}}'); event.stopPropagation();"></b>
{%- if ('MUTE' in scenario|get_scenario_tags) -%}
&nbsp;<b class="glyphicon glyphicon-volume-off"
title="{{ 'report.muted'|get_text }}">
</b>
&nbsp;<b class="glyphicon glyphicon-volume-off glyphicon-scenario" title="{{ 'report.muted'|get_text }}"></b>
{%- endif -%}
</span>
{% if scenario.retried is defined %}
<span class="glyphicon glyphicon-repeat btn-xs disabled pull-right red-behavex"
title="{{ 'report.icon_repeat.title'|get_text}}" data-duplicated data-id_hash="{{ scenario.id_hash }}"></span>
&nbsp;<b class="glyphicon glyphicon-repeat disabled red-behavex glyphicon-scenario" title="{{ 'report.icon_repeat.title'|get_text}}"
data-duplicated data-id_hash="{{ scenario.id_hash }}"></b>
{% endif %}
</div>
<div data-div-id_hash="{{ scenario.id_hash }}"
Expand Down
2 changes: 1 addition & 1 deletion behavex/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def run(args):
os.environ['FEATURES_PATH'] = features_path + ',' + paths
features_path = os.environ.get('FEATURES_PATH')
if features_path == '' or features_path is None:
os.environ['FEATURES_PATH'] = os.path.join(os.getcwd(), 'features')
os.environ['FEATURES_PATH'] = os.path.abspath(os.path.join('.', 'features'))
_set_env_variables(args_parsed)
set_system_paths()
cleanup_folders()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "behavex"
version = "4.0.7rc1"
version = "4.0.7rc2"
description = "Agile testing framework on top of Behave (BDD)."
readme = "README.md"
license = { text = "MIT" }
Expand Down

0 comments on commit 0e45270

Please sign in to comment.