Skip to content

Commit

Permalink
Merge pull request #132 from elchupanebrej/release/2.3.0
Browse files Browse the repository at this point in the history
Release backmerge
  • Loading branch information
elchupanebrej authored Nov 26, 2024
2 parents 6bd3067 + 7b32474 commit 28e25bc
Show file tree
Hide file tree
Showing 27 changed files with 2,947 additions and 2,901 deletions.
9 changes: 6 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,14 @@ Planned
- Contribute to messages repository with python model
- Add support of native legacy cucumber-json

Unreleased
----------
2.3.1
-----
- Fixup documentation generation

2.3.0
-----
- Add mobile readthedocs site support theme
- Convert e2e test features definitions to markdown
- Move documentation to Gherkin itself
- Implement support of `Markdown <https://github.com/cucumber/gherkin/blob/main/MARKDOWN_WITH_GHERKIN.md>`_ using js based parser
- Update versions:

Expand Down
80 changes: 40 additions & 40 deletions docs/features/Feature/Description.feature.rst
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
Feature: Descriptions
^^^^^^^^^^^^^^^^^^^^^
Free-form descriptions can be placed underneath Feature,
Example/Scenario, Background, Scenario Outline and Rule. You can write
anything you like, as long as no line starts with a keyword.
Descriptions can be in the form of Markdown - formatters including the
official HTML formatter support this.
Scenario:
'''''''''
- Given File "Description.feature" with content:
.. code:: gherkin
Feature:
My Feature description
Scenario:
Given I check feature description
- And File "conftest.py" with content:
.. code:: python
from pytest_bdd import given
@given('I check feature description')
def step(feature):
assert feature.description == "My Feature description"
- When run pytest
- Then pytest outcome must contain tests with statuses:
====== ======
passed failed
====== ======
1 0
====== ======
Feature: Descriptions
^^^^^^^^^^^^^^^^^^^^^

Free-form descriptions can be placed underneath Feature,
Example/Scenario, Background, Scenario Outline and Rule. You can write
anything you like, as long as no line starts with a keyword.
Descriptions can be in the form of Markdown - formatters including the
official HTML formatter support this.

Scenario:
'''''''''

- Given File "Description.feature" with content:

.. code:: gherkin
Feature:
My Feature description
Scenario:
Given I check feature description
- And File "conftest.py" with content:

.. code:: python
from pytest_bdd import given
@given('I check feature description')
def step(feature):
assert feature.description == "My Feature description"
- When run pytest

- Then pytest outcome must contain tests with statuses:

====== ======
passed failed
====== ======
1 0
====== ======
192 changes: 96 additions & 96 deletions docs/features/Feature/Load/Autoload.feature.rst
Original file line number Diff line number Diff line change
@@ -1,96 +1,96 @@
Feature: Gherkin features autoload
''''''''''''''''''''''''''''''''''
By default gherkin features are autoloaded and treated as usual pytest
tests if are placed in the tests hierarchy proposed by pytest. This
behavior could be disabled
Rule: Feature autoload
Background:
- Given File "Passing.feature" with content:
.. code:: gherkin
Feature: Passing feature
Scenario: Passing scenario
* Passing step
- Given File "Another.passing.feature.md" with content:
.. code:: markdown
# Feature: Passing feature
## Scenario: Passing scenario
* Given Passing step
- Given Install npm packages
======== =================
packages @cucumber/gherkin
======== =================
======== =================
- Given File "conftest.py" with content:
.. code:: python
from pytest_bdd import step
@step('Passing step')
def _():
...
Scenario: Feature is loaded by default
- When run pytest
- Then pytest outcome must contain tests with statuses:
+--------+
| passed |
+========+
| 2 |
+--------+
Scenario: Feature autoload could be disabled via command line
- When run pytest
======== ==========================
cli_args --disable-feature-autoload
======== ==========================
======== ==========================
- Then pytest outcome must contain tests with statuses:
+--------+
| passed |
+========+
| 0 |
+--------+
Scenario: Feature autoload could be disabled via pytest.ini
- Given Set pytest.ini content to:
.. code:: ini
[pytest]
disable_feature_autoload=true
- When run pytest
- Then pytest outcome must contain tests with statuses:
+--------+
| passed |
+========+
| 0 |
+--------+
Feature: Gherkin features autoload
''''''''''''''''''''''''''''''''''

By default gherkin features are autoloaded and treated as usual pytest
tests if are placed in the tests hierarchy proposed by pytest. This
behavior could be disabled

Rule: Feature autoload


Background:


- Given File "Passing.feature" with content:

.. code:: gherkin
Feature: Passing feature
Scenario: Passing scenario
* Passing step
- Given File "Another.passing.feature.md" with content:

.. code:: markdown
# Feature: Passing feature
## Scenario: Passing scenario
* Given Passing step
- Given Install npm packages

======== =================
packages @cucumber/gherkin
======== =================
======== =================

- Given File "conftest.py" with content:

.. code:: python
from pytest_bdd import step
@step('Passing step')
def _():
...
Scenario: Feature is loaded by default


- When run pytest
- Then pytest outcome must contain tests with statuses:

+--------+
| passed |
+========+
| 2 |
+--------+

Scenario: Feature autoload could be disabled via command line


- When run pytest

======== ==========================
cli_args --disable-feature-autoload
======== ==========================
======== ==========================

- Then pytest outcome must contain tests with statuses:

+--------+
| passed |
+========+
| 0 |
+--------+

Scenario: Feature autoload could be disabled via pytest.ini


- Given Set pytest.ini content to:

.. code:: ini
[pytest]
disable_feature_autoload=true
- When run pytest

- Then pytest outcome must contain tests with statuses:

+--------+
| passed |
+========+
| 0 |
+--------+
Loading

0 comments on commit 28e25bc

Please sign in to comment.