badeball / cypress-cucumber-preprocessor

Run cucumber/gherkin-syntaxed specs with Cypress
MIT License
1.32k stars 149 forks source link

No Documentation for Step Definitions using Data Tables #394

Closed jtaylor100 closed 4 years ago

jtaylor100 commented 4 years ago

I am currently trying to work out how to write a step definition using a gherkin data table. However the current README doesn't explain or give any examples of how the data in the table is handled by the step definitions.

How do you define steps using data tables? Is there an example anywhere?

The documentation is missing this information.

Kichiguy commented 4 years ago

I am also having this issue. I use data tables often in my tests and this has become a blocker for me.

lgandecki commented 4 years ago

https://github.com/TheBrainFamily/cypress-cucumber-preprocessor/blob/master/cypress/integration/DataTable.feature https://github.com/TheBrainFamily/cypress-cucumber-preprocessor/blob/master/cypress/support/step_definitions/dataTable.js

Are those helpful? I'd welcome a PR with changes to the README if so. :)

jtaylor100 commented 4 years ago

Thanks @lgandecki, these are helpful, please assign me and I'll make a PR

lgandecki commented 4 years ago

:tada: This issue has been resolved in version 2.5.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

StephenGillCoop commented 2 years ago

https://github.com/TheBrainFamily/cypress-cucumber-preprocessor/blob/master/cypress/integration/DataTable.feature https://github.com/TheBrainFamily/cypress-cucumber-preprocessor/blob/master/cypress/support/step_definitions/dataTable.js

Are those helpful? I'd welcome a PR with changes to the README if so. :)

Just a note that these are no longer available - showing a 404 @lgandecki so the README links are broken. I searched for DataTable.feature but can't find anything other than this PR. Happy to create a PR to update the README if you can point me to the feature and js file again?

badeball commented 2 years ago

Those tests are gone and have been replaced with cucumber tests. Here's what I'm guessing the equivalent is: https://github.com/badeball/cypress-cucumber-preprocessor/blob/master/features/data_table.feature

Here are cucumber-js' data table docs, which implementation is identical: https://github.com/cucumber/cucumber-js/blob/main/docs/support_files/data_table_interface.md