Closed maxtar closed 9 years ago
Do you have a single data row in your feature files? Currently the implementation expects the first row to be the header row and all following rows to be data rows. If you use a single data row in your feature files, which is perfectly fine in gherkin, the report interprets it as the header row.
I'll adapt the implementation to take these scenarios into account.
Thanks for the feedback! Greets Klaus
No, Klaus. We doesn't use single row data tables. All tables have headers and one data row at least
Klaus! I have understood! If table contains variables except constants, in this case table show only headers! For example:
| field1 | field2 |
| <value1> | <value2> |
In this case we will have got only headers.
In 63b56e0f6834349414181ac38b62e5967dfb00a8 I've tried to reproduce the bug, but in these cases the rendering seems to be ok see heroku report. If you could give me a complete scenario where the error occurs (or add it to the test-features via a pull request) I'll be happy to fix it.
Klaus, you did wrong case. :) You need use scenario outline instead of scenario. You can look at here. In your case it will be:
Scenario Outline: Invalid values
Given a calculator I just turned on
Given the previous entries:
| first | second | operation |
| <first> | <second> | <operation> |
When I press <operation>
Then the result is <result>
Examples:
| first | second | operation | result |
| -3 | -2 | + | 5 |
P.S.: sorry, but I can't send to you our case by private reason.
Hmm, strange. I have found Negative additions. Looks like our case.
Did the your step with the table data pass? Or did it fail or was skipped?
Steps were passed, but I don't think that these things have a relation. But I see than these steps have empty values. For example:
Scenario outline:
Given have next variables:
| header1 | header 2 |
| <value1> | <value2> |
Examples:
| value1 | value2 |
| havevalue11 | |
| havevalue12 | havevalue22 |
And maybe in the first case will be empty table...
Should be working now. I've deployed a new version on heroku. You can check the scenario Datatable with empty values.
I have found strange situation. I have run jUnit test with few features. And when I opened reports I see that some steps with table data show only table header without data. Still I can't understand why these occur. I think maybe depends on count of table fields but this version didn't confirm. Case of data fields name the same. P.S.: I checked, run from Junit or from cucumber directly doesn't matter.