Skip to content

Commit

Permalink
MENTION ENHANCEMENT: Support emojis in feature files and steps.
Browse files Browse the repository at this point in the history
  • Loading branch information
jenisys committed Jul 6, 2019
1 parent f97c8eb commit ff30f14
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -24,8 +24,9 @@ GOALS:
ENHANCEMENTS:

* Add support for Gherkin v6 grammar and syntax in ``*.feature`` files
* Use cucumber "gherkin-languages.json" now (simplify: Gherkin v6 aliases, language usage)
* Use `cucumber-tag-expressions`_ with tag-matching extension (superceeds: old-style tag-expressions)
* Use cucumber "gherkin-languages.json" now (simplify: Gherkin v6 aliases, language usage)
* Support emojis in ``*.feature`` files and steps
* issue #678: Scenario Outline: Support tags with commas and semicolons (provided by: lawnmowerlatte, pull #679)
* issue #675: Feature files cannot be found within symlink directories (provided by: smadness, pull #680)
* Select-by-location: Add support for "Scenario container" (Feature, Rule, ScenarioOutline) (related to: #391)
Expand Down
17 changes: 17 additions & 0 deletions docs/new_and_noteworthy_v1.2.7.rst
Expand Up @@ -8,6 +8,7 @@ Summary:
* :pypi:`cucumber-tag-expressions` are extended by "tag-matching"
to match partial tag names, like: ``@foo.*``
* `Select-by-location for Scenario Containers`_ (Feature, Rule, ScenarioOutline)
* `Support for emojis in feature files and steps`_

.. _`Example Mapping`: https://cucumber.io/blog/example-mapping-introduction/
.. _`Example Mapping Webinar`: https://cucumber.io/blog/example-mapping-webinar/
Expand Down Expand Up @@ -135,3 +136,19 @@ Now you can select all entities of a **Scenario Container** (Feature, Rule, Scen

A file-location into a **Scenario Container** selects all its entities
(Scenarios, ...).


Support for Emojis in Feature Files and Steps
-------------------------------------------------------------------------------

* Emojis can now be used in ``*.feature`` files.
* Emojis can now be used in step definitions.
* You can now use ``language=emoji (em)`` in ``*.feature`` files ;-)

.. literalinclude:: ../features/i18n_emoji.feature
:prepend: # -- FILE: features/i18n_emoji.feature
:language: gherkin

.. literalinclude:: ../features/steps/i18n_emoji_steps.py
:prepend: # -- FILE: features/steps/i18n_emoji_steps.py
:language: python
7 changes: 7 additions & 0 deletions features/i18n_emoji.feature
@@ -0,0 +1,7 @@
# language: em
# SOURCE: https://github.com/cucumber/cucumber/blob/master/gherkin/testdata/good/i18n_emoji.feature

πŸ“š: πŸ™ˆπŸ™‰πŸ™Š

πŸ“•: πŸ’ƒ
😐🎸
10 changes: 10 additions & 0 deletions features/steps/i18n_emoji_steps.py
@@ -0,0 +1,10 @@
# -*- coding: UTF-8 -*-
# NEEDED-BY: features/i18n_emoji.feature

from behave import given

@given(u'🎸')
def step_impl(context):
"""Step implementation example with emoji(s)."""
pass

0 comments on commit ff30f14

Please sign in to comment.