kiwigrid/gherkin-testcafe

Support for Doc String type

Opened this issue · 3 comments

Dreun commented

Hi all,

I am trying to implement a step which feature file looks like:

Scenario Outline: something something
     Given an individual customer with an account
        ....
      Then a warning tile will display the following message:
            """
            Lorem ipsum etc etc
            Lorem ipsum line 2
            """

Following this documentation https://cucumber.io/docs/gherkin/reference/#doc-strings I assumed this argument is passed just like a Data Table, so I create my step like this:

Then('a warning tile will display the following message:', async (t, ...docString) => {
    console.log(docString);
});

This step works, but the console.log() results in [ [], null ]
I have looked in a lot of documentations, but I can't find anything that could help me.

Is Doc String supported ? And if so, what is the correct usage?

Thanks!

Hi @Dreun,

no, doc strings are not supported, unfortunately.

Dreun commented

Thanks for the quick response. If I was to build it myself, could you give me some pointers where to start?

You would need to modify gherkin-testcafe to pass this parameter to your step implementation.

If you are brave enough to do it: