Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/doc alabaster mobile #128

Merged
merged 4 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ Unreleased
----------
- Implement support of `Markdown <https://github.com/cucumber/gherkin/blob/main/MARKDOWN_WITH_GHERKIN.md>`_ using js based parser
- Update versions:

- Drop python 3.8
- Add python 3.13
- Drop pytest<5.2

- Added dummy html reporter
- Fixed pytest.ini option "disable_feature_autoload"
- Improved fixture injection by adding seamless fixtures on plugin/module collection
Expand Down
40 changes: 33 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ BDD library for the pytest runner
.. _behave: https://pypi.python.org/pypi/behave
.. _pytest: https://docs.pytest.org
.. _Gherkin: https://cucumber.io/docs/gherkin/reference
.. _pytest-bdd-ng: https://pytest-bdd-ng.readthedocs.io/en/default/
.. _pytest-bdd: https://github.com/pytest-dev/pytest-bdd

**pytest-bdd-ng** combine descriptive clarity of Gherkin_ language
Expand All @@ -28,9 +27,6 @@ mentioned in feature steps with dependency injection. This allows a true BDD
just-enough specification of the requirements without obligatory maintaining any context object
containing the side effects of Gherkin imperative declarations.

.. NOTE:: Project documentation on readthedocs: pytest-bdd-ng_


Why ``NG`` ?
------------

Expand Down Expand Up @@ -97,21 +93,51 @@ Install pytest-bdd-ng

pip install pytest-bdd-ng

Install extra packages for parsing Markdown defined features
############################################################
Packages for parsing Markdown defined features
##############################################

.. code-block:: console

npm install @cucumber/gherkin

Install extra packages for reporting
Packages for reporting
####################################

.. code-block:: console

npm install @cucumber/html-formatter


TLDR;
-----

.. code-block:: gherkin

Feature: Simplest example
Scenario:
# https://cucumber.io/docs/gherkin/reference/
Given File "Passing.feature" with content:
"""gherkin
Feature: Passing feature
Scenario: Passing scenario
* Passing step
"""
# https://docs.pytest.org/en/stable/reference/fixtures.html#conftest-py-sharing-fixtures-across-multiple-files
And File "conftest.py" with content:
"""python
from pytest_bdd import step

@step('Passing step')
def _():
...
"""
# https://docs.pytest.org/en/stable/how-to/usage.html
When run pytest
Then pytest outcome must contain tests with statuses:
|passed|
| 1|


Project layout
--------------
**pytest-bdd-ng** automatically collects ``*.feature`` files from pytest_ tests directory.
Expand Down
9 changes: 6 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,12 @@
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
"page_width": "100%",
"sidebar_width": "270px",
"body_max_width": "1200%",
"page_width": "1440px",
"fixed_sidebar": True,
"github_banner": True,
"github_user": "elchupanebrej",
"github_repo": "pytest-bdd-ng",
"body_max_width": "max-content",
}

# Add any paths that contain custom themes here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/include.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
.. include:: features.rst
.. include:: ../DOCUMENTATION.rst
.. include:: ../AUTHORS.rst
.. include:: ../CHANGES.rst
.. include:: ../LICENSE.rst
.. include:: ../CHANGES.rst
Loading
Loading