检查 JavaScript 的功能测试
我的要求是在 ruby on Rails 中编写一个功能测试来检查 javascript 是否已加载。谁能给我一些提示或例子,以便我能够理解它是什么以及如何处理它?
my requirement is to write a functional test in ruby on rails to check whether javascript is loaded or not. can anyone give me some hint or example so that i can understand, what and how to do with it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您还可以将 Cucumber 与水豚一起使用,在场景之前使用 @javascript 标记测试您的视图。
http://openmonkey.com/2010/04/09/ javascript-testing-with-cucumber-capybara/
You can also use Cucumber with capybara to test your views with @javascript tag before your scenarios.
http://openmonkey.com/2010/04/09/javascript-testing-with-cucumber-capybara/