diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fa150e3..b5d22346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project closely adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.0.4 +- Change - for retry steps, also log before and after call messages + ## 1.0.3 - Add - functional test for drag and drop file functionality diff --git a/features/cli/report_basics.feature b/features/cli/report_basics.feature index 6a983f06..adcfade8 100644 --- a/features/cli/report_basics.feature +++ b/features/cli/report_basics.feature @@ -204,7 +204,7 @@ Feature: Report basics @runtime-timeout Scenario: User can run with a runtime timeout and still produce a valid report Given I run the command "cucu run data/features/slow_features --runtime-timeout 9 --results {CUCU_RESULTS_DIR}/runtime_timeout_reporting_results" and expect exit code "1" - Then I should see the previous step took less than "13" seconds + Then I should see the previous step took less than "14" seconds When I run the command "cucu report {CUCU_RESULTS_DIR}/runtime_timeout_reporting_results --output {CUCU_RESULTS_DIR}/runtime_timeout_reporting_report" and expect exit code "0" And I start a webserver at directory "{CUCU_RESULTS_DIR}/runtime_timeout_reporting_report/" and save the port to the variable "PORT" And I open a browser at the url "http://{HOST_ADDRESS}:{PORT}/index.html" diff --git a/pyproject.toml b/pyproject.toml index ebb5d842..43845b53 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cucu" -version = "1.0.3" +version = "1.0.4" description = "Easy BDD web testing" readme = "README.md" license = { text = "The Clear BSD License" } diff --git a/src/cucu/steps/file_input_steps.py b/src/cucu/steps/file_input_steps.py index 07245753..22226585 100644 --- a/src/cucu/steps/file_input_steps.py +++ b/src/cucu/steps/file_input_steps.py @@ -68,6 +68,7 @@ def upload_file_to_input(ctx, filepath, name): return input; """ + def drag_and_drop_file(ctx, name, filepath): drop_target = fuzzy.find(ctx.browser, name, ["*"]) drop_target_html = drop_target.get_attribute("outerHTML") diff --git a/src/cucu/utils.py b/src/cucu/utils.py index e2e55d16..7d41a955 100644 --- a/src/cucu/utils.py +++ b/src/cucu/utils.py @@ -11,6 +11,8 @@ import humanize from tabulate import DataRow, TableFormat, tabulate from tenacity import ( + after_log, + before_log, before_sleep_log, retry_if_not_exception_type, stop_after_delay, @@ -119,6 +121,8 @@ def retry(func, wait_up_to_s=None, retry_after_s=None): stop=stop_after_delay(wait_up_to_s), wait=wait_fixed(retry_after_s), retry=retry_if_not_exception_type(StopRetryException), + before=before_log(logger, logging.DEBUG), + after=after_log(logger, logging.DEBUG), before_sleep=before_sleep_log(logger, logging.DEBUG), ) def new_decorator(*args, **kwargs): diff --git a/uv.lock b/uv.lock index 03218020..bb89e76a 100644 --- a/uv.lock +++ b/uv.lock @@ -263,7 +263,7 @@ toml = [ [[package]] name = "cucu" -version = "1.0.3" +version = "1.0.4" source = { editable = "." } dependencies = [ { name = "beautifulsoup4" },