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

Support and Document overriding format features #252

Open
Twintails opened this issue Oct 30, 2024 · 1 comment
Open

Support and Document overriding format features #252

Twintails opened this issue Oct 30, 2024 · 1 comment

Comments

@Twintails
Copy link

Twintails commented Oct 30, 2024

🤔 What's the problem you've observed?

When saving a feature file which VSCode has mapped as Cucumber language.
Format on Save works well to keep feature files more readable.

When utilizing Playwright + BDD to compose Scenario Outlines with Examples table there is a feature to support Custom example titles for feature-generation.

In VS Code, with the cucumber extension, and with format on save enabled for the language. A rule or function of the format inserts a blank line Above the "Examples:" block. This causes the Playwright + BDD code generator to NOT detect the special comment syntax.

it changes

Feature: Localization

    Scenario Outline: Check title
      Given user locale is "<locale>"
      Then page title is "<title>"

      # title-format: locale - <locale>
      Examples:
          | locale | title      |
          | en     | Playwright |
          | es     | Dramaturgo |

to

Feature: Localization

    Scenario Outline: Check title
      Given user locale is "<locale>"
      Then page title is "<title>"
      # title-format: locale - <locale>

      Examples:
          | locale | title      |
          | en     | Playwright |
          | es     | Dramaturgo |

which then causes Example Titles to not work as needed.

✨ Do you have a proposal for making it better?

The Format on save for cucumber has a lint rule, or unseen setting which needs more easily findable documentation.

We would like to know how to disable cucumber.comment.lineBefore or cucumber.comment.lineAfter
or set cucumber.comment.lineAfter: { beforeExamples: false }

📚 Any additional context?

if there is already an rc or cucumber.config.yaml file or something one could point to on how to customize or override this setting. That would be great as well.

@Twintails
Copy link
Author

maybe related to #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant