2

将“然后向我显示页面”行添加到黄瓜场景中可以在我同事的计算机上使用相同的设置,但在我的计算机上不行。实际上,添加暂停步骤定义并调用它似乎完全被忽略了。

步骤定义:

Then /^show me the page$/ do
  save_and_open_page
end

AfterStep('@pause') do
  print "Press Return to continue"
  STDIN.getc
end

特征:

(line 25) Scenario Outline: An authorised user visits the blah..,
Given a blah: ... blah ...
  And I am logged in as <role>
  And the date is 1 April 2012
When I go to the blah page
 And I click "foobar"
Then I should see "Blah foobar"
And I should see "Foobar on Mon Apr 1 00:00:00 2012 by <email>"
Then show me the page
And ...

命令行:

cucumber features/blah/foos.feature:25 --require features --tags @pause

使用 Firefox 16.02(避免 17 中的 bug)

两台机器都有 git-fetch'd、pull'd、bundle install'd,所以所有 gem 都是相同的,都使用 Rbenv 版本 * 1.9.3-p327-perf。我可能遗漏了一些明显的东西......

更新: tmp/capybara/ 不包含该文件,所以它现在没有被保存......

感谢 Beerlington 的解决方案:将显示的页面向上移动一个。在向我显示页面之前出现故障,因此没有显示。

4

1 回答 1

2

复制评论中的答案,以便从“未回答”过滤器中删除此问题:

感谢Beerlington的解决方案:将向我展示的页面向上移动一个。在向我显示页面之前出现故障,因此没有显示。

于 2013-10-09T04:53:50.567 回答