Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Support for Doc String type #51

Open
Dreun opened this issue Sep 25, 2019 · 3 comments
Open

Support for Doc String type #51

Dreun opened this issue Sep 25, 2019 · 3 comments

Comments

@Dreun
Copy link

Dreun commented Sep 25, 2019

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!

@Lukas-Kullmann
Copy link
Contributor

Hi @Dreun,

no, doc strings are not supported, unfortunately.

@Dreun
Copy link
Author

Dreun commented Sep 25, 2019

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

@Lukas-Kullmann
Copy link
Contributor

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

If you are brave enough to do it:

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

No branches or pull requests

2 participants