具有多个数据表的黄瓜步骤

Cucumber step with multiple DataTables

如何编写具有两个数据表的 Cucumber 步骤?

feature文件中应该怎么写?

例如,将一行从一个 table 拖动到第二个 table 的步骤:

When I drag a row from  
   | column_table1 |   
   | object1       |  
to   
   | column_table2 |   
   | object2       | 

没有特殊语法可以添加第二个 table。加个就行了。

When I drag a row from:
| column_table1 |   
| object1       |  
And I drop it at:
| column_table2 |   
| object2       |  

AFAIK,每个步骤只能有一个 table,但是您可以根据需要使用 table 进行任意多个步骤。我解决这个问题的一种方法是将 tables 存储在一个变量中,以便在第三步中经常引用:

Given I have a source row from:
<table>
And I have a destination row at:
<table>
When I drag from the source row and drop at the destimation row
Then .....