Home > Back-end >  Is there a visual studio code extension to auto space and auto format example section in scenario ou
Is there a visual studio code extension to auto space and auto format example section in scenario ou

Time:03-14

I want to have an extension from visual studio code which auto format content under Examples section as below.

This is for behave framework. Below code depicts scenario outline.

   Given I put <thing> in a blender,
    when I switch the blender on
    then it should transform into <other thing>

 Examples: Amphibians
   | thing         | other thing |
   | Red Tree Frog | mush        |

I have a long list of arguments and it is very tedious to work with that.

Note: I currently use these extensions

  1. Cucumber (Gherkin) Full Support
  2. Python

What I tried: I tried numerous code formatter extensions none of which support this requirement.

Thanks in advance

CodePudding user response:

I have written a first version of a table formatter for Behave files

Extension Behave

CodePudding user response:

The Format document option by the Visual studio code does what is intended.

  1. Select the feature file
  2. Right click on the editor
  3. Click on Format document
  • Related