我有这两个测试。他们几乎做同样的事情,所以我不想写两个独立的步骤来做几乎同样的事情。
Scenario: I delete a question link
Given I am on the home page
When I "delete" a "question" link
Then A "question" link should be "deleted"
Scenario: I delete a account link
Given I am on the home page
When I "delete" an "account" link
Then An "account" link should be "deleted"
如果我想编写一个与I "delete" a "question" link
and一起使用的步骤,I "delete" an "account" link
我将如何修改以下正则表达式来处理“a”和“an”。
/^I "([^"]*)" a/an?? "([^"]*)" link$/