我有一个假想:
Given I signed in to my business account
And there is one customer named "Samantha Seeley"
When I go to the customers management page
Then "Delete" should show a confirmation dialog saying "Are you sure?"
连结很简单:
<%= link_to Delete customer_path(customer), method: :delete, confirm: Are you sure? do %>
因此这个代码确实使确认对话框出现 当我点击铬的链接时, 但使用页面来表达 :
Then /^"(.*?)" should show a confirmation dialog saying "(.*?)"$/ do |arg1, arg2|
click_on arg1
page.driver.render "tmp/screenshot.jpg"
end
我相信我可以相信,从截图上看,刺绣似乎没有被评估(没有显示确认对话框 ) 。 但这一假设可能是错误的,但我不知道。
谢谢你的帮助