2

当我单击一个项目以在 web 上打开时出现以下错误。我们中的任何人都知道解决方案吗?

错误:test_inline_edit_an_item_app_built_via_app_builder(TaskFeature): Capybara::Poltergeist::JavascriptError: 页面上的 Javascript 代码中出现一个或多个错误。如果您不关心这些错误,可以通过在 Poltergeist 配置中设置 js_errors: false 来忽略它们(有关详细信息,请参阅文档)。


TypeError:'未定义'不是对象(评估't.subscribe')在https://d3tga9h80dykic.cloudfront.net/assets/cd319648/podio-common-amd.js:1 /home/abhay/.rvm/gems/ruby-1.9.3-p362/gems/poltergeist-1.1.0/lib/capybara/poltergeist/browser.rb:197:in command' /home/abhay/.rvm/gems /ruby-1.9.3-p362/gems/poltergeist-1.1.0/lib/capybara/poltergeist/browser.rb:42:infind' /home/abhay/.rvm/gems/ruby-1.9.3-p362/gems /poltergeist-1.1.0/lib/capybara/poltergeist/driver.rb:110:in find' /home/abhay/.rvm/gems/ruby-1.9.3-p362/gems/capybara-2.0.2/lib/ capybara/node/finders.rb:113:inblock in all'/home/abhay/.rvm/gems/ruby-1.9.3-p362/gems/capybara-2.0.2/lib/capybara/node/base.rb: 78:在同步中'/home/abhay/.rvm/gems/ruby-1.9.3-p362/gems/capybara-2.0.2/lib/capybara/node/finders.rb:112:inall'/home/abhay/ .rvm/gems/ruby-1.9.3-p362/gems/capybara-2.0.2/lib/capybara/node/finders.rb:26:in block in find' /home/abhay/.rvm/gems/ruby- 1.9.3-p362/宝石/水豚-2.0。2/lib/capybara/node/base.rb:78:insynchronize'/home/abhay/.rvm/gems/ruby-1.9.3-p362/gems/capybara-2.0.2/lib/capybara/node/finders。 rb:26:in find' /home/abhay/.rvm/gems/ruby-1.9.3-p362/gems/capybara-2.0.2/lib/capybara/session.rb:341:inblock (2 个级别) 在课堂上:Session' /home/abhay/.rvm/gems/ruby-1.9.3-p362/gems/capybara-2.0.2/lib/capybara/dsl.rb:51:in block (2 levels) in ' task_feature.rb :489:inblock in test_inline_edit_an_item_app_built_via_app_builder' /home/abhay/podio/auto_deetee/auto_deetee/test/test_helper.rb:69:in login_as' task_feature.rb:473:intest_inline_edit_an_item_app_built_via_app_builder'2/lib/capybara/session.rb:341:inblock(2 个级别)在类:Session' /home/abhay/.rvm/gems/ruby-1.9.3-p362/gems/capybara-2.0.2/lib/ capybara/dsl.rb:51:in block (2 levels) in 'task_feature.rb:489:inblock in test_inline_edit_an_item_app_built_via_app_builder' /home/abhay/podio/auto_deetee/auto_deetee/test/test_helper.rb:69:in login_as' task_feature。 rb:473:intest_inline_edit_an_item_app_built_via_app_builder'2/lib/capybara/session.rb:341:inblock(2 个级别)在类:Session' /home/abhay/.rvm/gems/ruby-1.9.3-p362/gems/capybara-2.0.2/lib/ capybara/dsl.rb:51:in block (2 levels) in 'task_feature.rb:489:inblock in test_inline_edit_an_item_app_built_via_app_builder' /home/abhay/podio/auto_deetee/auto_deetee/test/test_helper.rb:69:in login_as' task_feature。 rb:473:intest_inline_edit_an_item_app_built_via_app_builder'

1 次测试,0 次断言,0 次失败,1 次错误,0 次跳过

4

1 回答 1

12

当 Poltergeist 在您正在测试的页面上检测到 Javascript 错误时,会发生此错误。Poltergeist 这样做是为了确保您的网站上有无错误的 Javascript 代码(这是大多数人想要的)。

但是,有些人不希望收到有关 Javascript 错误的通知。因此,您可以使用js_errors: false选项使此错误消失。(虽然这不会修复你的 Javascript。)

于 2013-03-01T19:58:17.473 回答