From 323aca81d0c5b935262c209b963b36d33d5787c5 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridnev Date: Wed, 5 Nov 2025 20:33:46 +0300 Subject: [PATCH] feat: release version 4.1.4 with Gherkin step input data support - Updated version to 4.1.4 in pyproject.toml. - Added support for input data in Gherkin steps within the API client. - Updated changelog to reflect the new version and changes. This release enhances the functionality of Gherkin steps by allowing the inclusion of input data, improving test case definitions. --- qase-python-commons/changelog.md | 6 ++++++ qase-python-commons/pyproject.toml | 2 +- .../src/qase/commons/client/api_v2_client.py | 2 ++ qase-python-commons/src/qase/commons/models/step.py | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/qase-python-commons/changelog.md b/qase-python-commons/changelog.md index d4fb4161..bb008b44 100644 --- a/qase-python-commons/changelog.md +++ b/qase-python-commons/changelog.md @@ -1,3 +1,9 @@ +# qase-python-commons@4.1.4 + +## What's new + +- Added support input data for Gherkin steps. + # qase-python-commons@4.1.3 ## What's new diff --git a/qase-python-commons/pyproject.toml b/qase-python-commons/pyproject.toml index d1f99d63..738367f2 100644 --- a/qase-python-commons/pyproject.toml +++ b/qase-python-commons/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-python-commons" -version = "4.1.3" +version = "4.1.4" description = "A library for Qase TestOps and Qase Report" readme = "README.md" authors = [{name = "Qase Team", email = "support@qase.io"}] diff --git a/qase-python-commons/src/qase/commons/client/api_v2_client.py b/qase-python-commons/src/qase/commons/client/api_v2_client.py index a2d7b4c7..3eb3e544 100644 --- a/qase-python-commons/src/qase/commons/client/api_v2_client.py +++ b/qase-python-commons/src/qase/commons/client/api_v2_client.py @@ -151,6 +151,8 @@ def _prepare_step(self, project_code: str, step: Step) -> Dict: if step.data.keyword != step.data.name: action += " " + step.data.name prepared_step['data']['action'] = action + if step.data.data: + prepared_step['data']['input_data'] = step.data.data if step.step_type == StepType.SLEEP: prepared_step['data']['action'] = f"Sleep for {step.data.duration} seconds" diff --git a/qase-python-commons/src/qase/commons/models/step.py b/qase-python-commons/src/qase/commons/models/step.py index bd05b9b4..8a74203c 100644 --- a/qase-python-commons/src/qase/commons/models/step.py +++ b/qase-python-commons/src/qase/commons/models/step.py @@ -32,10 +32,11 @@ def __init__(self, expected: str, actual: str, message: str): class StepGherkinData(BaseModel): - def __init__(self, keyword: str, name: str, line: int): + def __init__(self, keyword: str, name: str, line: int, data: Optional[str] = None): self.keyword = keyword self.name = name self.line = line + self.data = data class StepRequestData(BaseModel):