Then /I see overlap exception/ do
error_div = find('.alert')
error_div.has_content? 'Capacity Commitment can not overlap other period'
end
Hounds thrown error如下:
模糊的正则表达式字面量。如果方法参数肯定是正则表达式文字,或者在/的右边添加一个空格,如果它应该是一个除法,则对其进行括号化。
我使用黄瓜功能/ account_management / participant_accounts.feature --strict但没有发现错误并且测试成功通过。
答案 0 :(得分:0)
我们需要为字符串匹配使用特定格式:
Then /^I see overlap text$/ do
error_div = find('.alert')
error_div.has_content? 'Capacity Commitment can not overlap other period'
end