0

I have a feature file in Behat (below) where I define the table headings. I have been using getRowsHash() to get the table headings and it has been working fine.

| TableHeadings |
| FlagIcon      |
| Flight        |
| Stand         |
| From          |

But just recently while testing a page with 18 headings, it started failing. I could't get any answers. So thought of trying getHash() instead and it worked fine.

Is there a limitation with getRowsHash() beyond 15 rows or should I be using getRows() or getHash() instead.

Note: If I use getRowsHash(), I get an error that expected (15) is not equal to Actual (18). As I mentioned above I have expected (18 headings not 15)

vijay pujar
  • 1,683
  • 4
  • 19
  • 32

1 Answers1

0

There's no such limitation, see it for yourself: https://github.com/Behat/Gherkin/blob/master/src/Behat/Gherkin/Node/TableNode.php#L92

There must be a mistake on your side. You gave too little details to judge where it is exactly.

Are your scenarios still readable with so much details in them? I'd consider putting only relevant details into your scenarios and hide the rest in a context file.

Jakub Zalas
  • 35,761
  • 9
  • 93
  • 125
  • I completely understand that. But can you please try testing with 18 rows and see if the getRowsHash() works. Just by changing this to getHash() worked for me. – vijay pujar Feb 19 '14 at 10:25
  • Hi Jakub, as you mentioned above, the feature files are looking quite messy with all the information on them. You mentioned above "putting only relevant details into your scenarios and hide the rest in a context file.". Could you please let me know how we do that – vijay pujar Sep 11 '14 at 14:48