为什么phantomjs间歇性地提交GET XHR请求以获取rails DELETE XHR链接?

时间:2013-12-11 01:45:27

标签: phantomjs poltergeist

给定以下由rails绘制的链接

<a id="leave_community" data-method="delete" 
    data-confirm="Are you sure?" 
    href="/group_memberships/1">
  Leave Us
</a>

以下版本

rails 3.2.16
phantomjs 1.9.2 from brew bottle
poltergeist 1.5.0
capybara 2.2.0

时,我会执行以下的Capybara动作10次

find("#leave_community").trigger('click')

然后五次通过,五次我

Internal Server Error No route matches [GET] "/group_memberships/1"

症状

预计[DELETE],获得[GET]

日志

egrep -i '(GET|DELETE) "/group_memberships' log/test.log | tail -n 10
Started DELETE "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:15:12 -0500
Started GET "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:15:38 -0500
Started GET "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:16:06 -0500
Started DELETE "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:16:32 -0500
Started DELETE "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:16:57 -0500
Started GET "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:17:23 -0500
Started GET "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:17:51 -0500
Started GET "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:18:18 -0500
Started DELETE "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:18:45 -0500
Started DELETE "/group_memberships/1" for 127.0.0.1 at 2013-12-10 20:19:13 -0500

问题

这种间歇性行为是否是poltergeist / phantomjs中的错误,还是我应该采取一些措施来自行调试?

0 个答案:

没有答案