我正在创建两个简单的场景,如下所示:
Scenario: 1
Given I am on the homepage
When I click the expand arrow
Then the drawer is expanded
Scenario: 2
Given the drawer is expanded
问题是第一个场景的 THEN 和第二个场景的 GIVEN 是黄瓜这样写的:
Then /^the drawer is expanded$/ do
Given /^the drawer is expanded$/ do
然后我收到一条错误消息:
Ambiguous match of "the drawer is expanded"
当我尝试运行它时。
有没有办法避免这种模棱两可的步骤?
非常感谢!