POST params are not sent in AJAX requests
It seems that POST params on AJAX request are not sent to the server. I'm not sure it's a capybara-envjs bug or a envjs bug.
I built a small Sinatra app at https://github.com/kookoolen/capybara-envjs-bug
Just clone it, run bundle install and rake cucumber to see it fail.
The same feature pass with selenium instead of envjs.
Hmmm ... I'm having trouble replicating this:
Feature: Showing bug
In order to illustrate the bug I've found
I write a feature
@javascript
Scenario: Sending an AJAX POST # features/ajax_post.feature:6
Given I am on the homepage # features/step_definitions/web_steps.rb:19
When I fill in "Text" with "This is a test" # features/step_definitions/web_steps.rb:39
And I follow "Send AJAX POST" # features/step_definitions/web_steps.rb:33
Then I should see "tset a si sihT" # features/step_definitions/web_steps.rb:107
1 scenario (1 passed)
4 steps (4 passed)
0m1.887s
What ruby/OS?
OS X and ruby -v gives :
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
Which OS X? (not that I think that matters, but ...)
Could you try 1.8.7p302 (rvm should help). p174 is pretty old, though generally the results from incompatible spidermonkey/ruby was core dumps, not invalid operation.
My version of OS X is 10.6.4
I tried with 1.8.7p302 thanks to rvm and I still get the same result. I didn't manage to test it with 1.9.1 since johnson native extensions don"t compile under 1.9.1.
Well, I'm kind of clueless. The only thing I see that's different is that I'm running on the master code for all the relevant gems (johnson, env-js, capybara, capybara-envjs).