【问题标题】:cucumber show me the page not showing page (Solution: it was on the wrong line)cucumber 向我显示未显示页面的页面(解决方案:它在错误的行上)
【发布时间】:2013-10-09 12:53:50
【问题描述】:

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

步骤定义:

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 中的错误)

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

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

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

【问题讨论】:

  • 它是真的到达了那一步还是在到达那里之前失败了?
  • 哦,不……那是 0_0 DERP *kickself* 作为答案?我应该将“显示页面”上移一行,我在同事的计算机上将其输入了上一行。也许这就是为什么暂停的事情也不起作用......
  • 呃,我不知道这对未来的访问者有多大的价值。我很想关闭它。
  • 结束是最好的,但取而代之的是,输入答案会更加礼貌 - 否则这个问题将永远保留在“未回答”过滤器中。

标签: ruby-on-rails ruby cucumber


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-03-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-12
    • 1970-01-01
    相关资源
    最近更新 更多