So I have implemented a Cucumberjs data table, however I do not think I have done it right.. Here what I have
this.And(/^If I click the row "([^"]*)" then I should the following nested information$/, function (rowName, data) {
resultPage.clickRow(rowName);
data = dataTable.raw();
return console.log(data);
});
And my Gherkin step looks like
Then If I click the row "Summary" then I should the following nested information
| Tax | 11.50
| Gratuity | 4.50
| Total | 26.59
right now I am just trying to get this table and print it out to make sure it comes back in the right format, but I get a lexing error and the test wont even start. How can you implement this in Javascript?? I cant seem to find any documentation or examples online for cucumberjs, but of course there are several for java/cucumber.
Also, I understand that the lexing error is related to the fact that it is expecting this to be a scenario outline, and that I did not specify Example: before the table. However, this is not supposed to be a scenario outline. This is supposed to be a data table..