capybara-envjs icon indicating copy to clipboard operation
capybara-envjs copied to clipboard

POST params are not sent in AJAX requests

Open sylvaindesve opened this issue 15 years ago • 5 comments

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.

sylvaindesve avatar Nov 08 '10 20:11 sylvaindesve

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?

smparkes avatar Nov 09 '10 03:11 smparkes

OS X and ruby -v gives : ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

sylvaindesve avatar Nov 09 '10 05:11 sylvaindesve

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.

smparkes avatar Nov 09 '10 16:11 smparkes

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.

sylvaindesve avatar Nov 09 '10 21:11 sylvaindesve

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).

smparkes avatar Nov 12 '10 22:11 smparkes