diff --git a/CHANGES.rst b/CHANGES.rst index 01bd1bda8..d1652750d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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) diff --git a/docs/new_and_noteworthy_v1.2.7.rst b/docs/new_and_noteworthy_v1.2.7.rst index ff1cd1f42..b7242f75b 100644 --- a/docs/new_and_noteworthy_v1.2.7.rst +++ b/docs/new_and_noteworthy_v1.2.7.rst @@ -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/ @@ -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 diff --git a/features/i18n_emoji.feature b/features/i18n_emoji.feature new file mode 100644 index 000000000..db23ac2cd --- /dev/null +++ b/features/i18n_emoji.feature @@ -0,0 +1,7 @@ +# language: em +# SOURCE: https://github.com/cucumber/cucumber/blob/master/gherkin/testdata/good/i18n_emoji.feature + +📚: 🙈🙉🙊 + + 📕: 💃 + 😐🎸 diff --git a/features/steps/i18n_emoji_steps.py b/features/steps/i18n_emoji_steps.py new file mode 100644 index 000000000..381d2bbdf --- /dev/null +++ b/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 +