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

The extension dels all my comments in .feature file #175

Closed
triori opened this issue Sep 12, 2023 · 4 comments
Closed

The extension dels all my comments in .feature file #175

triori opened this issue Sep 12, 2023 · 4 comments

Comments

@triori
Copy link

triori commented Sep 12, 2023

πŸ‘“ What did you see?

The extension dels all my comments in .feature file when I try to save it.

βœ… What did you expect to see?

I expect to see all my comments after #-sign

πŸ“¦ Which tool/library version are you using?

VS Code v1.82.1
Cucumber v1.7.0

πŸ”¬ How could we reproduce it?

Steps to reproduce the behavior:

  1. Install VS Code version 1.82.1 and Cucumber v1.7.0
  2. Create a file called foo.feature with text
Feature: test feature
  Some text 

  #foobar
  Background:
    Given I try to login as "McGonagall" user
    When I have open survey
    And wait until the page loads

  1. Try to save file with Cucumber prettier
  2. See file without #foobar
@RobinsonRojas
Copy link

I have the same problem

@xeger
Copy link
Member

xeger commented Sep 20, 2023

Thank you for the bug report. This is mostly fixed in v1.8.0 which should be published to the Visual Studio Code Marketplace soon, or you can install from the .vsix file in the linked release.

There is still one case that isn't fixed; see @cucumber/gherkin-utils#38 -- I will address this separately as it requires updates to underlying packages.

@xeger xeger closed this as completed Sep 20, 2023
@zilia-gmethot
Copy link

Thank you for the bug report. This is mostly fixed in v1.8.0 which should be published to the Visual Studio Code Marketplace soon, or you can install from the .vsix file in the linked release.

There is still one case that isn't fixed; see @cucumber/gherkin-utils#38 -- I will address this separately as it requires updates to underlying packages.

I've just installed version 1.8.0 and it is still buggy. When I put a comment on top of a scenario and save, it adds an empty line under the comment. For instance, this code

Scenario: 1
  ...

# This is a comment
Scenario: 2
  ...

results in

Scenario: 1
  ...
# This is a comment

Scenario: 2
  ...

This is highly problematic as this extension seems to be the only thing in Gherkin/JS land that automatically format tables. Having to disable the extension because of this issue makes writing tests much more painful than it needs to be.

@xeger
Copy link
Member

xeger commented Oct 4, 2023

Thank you for the bug report. I've added this to my list of formatting issues to fix in the related package. I don't have much time to devote to Cucumber just now but I am hoping to have more time later this quarter to work on reliability of the formatter.

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

4 participants