Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

$.ajax delete request not sending data parameters in capybara-webkit #512

Closed
ycha28 opened this issue Apr 16, 2013 · 1 comment
Closed

Comments

@ycha28
Copy link

ycha28 commented Apr 16, 2013

I'm finding that my ajax DELETE requests are not sending data parameters to the controller when I execute them through capybara-webkit. However, the data parameters do get sent (and the test passes) when I run the test suite by using selenium. My code looks like the following:

$(document).on 'click', 'a.delete_contact', ->
  if confirm "Are you sure you want to delete this contact?"
    id = $('a.delete_contact').data('id')
    name = $('a.delete_contact').data('name')
    $.ajax '/contacts',
      type: 'DELETE'
      dataType: 'html'
      data: {'id' : id}
      success: ->
        $("li[data-cid='#{id}']").remove()
        removeInitial(_.last(name.split(" "))[0])
        show_notice("Contact successfully destroyed.", 'notice')
        window.contactSelection.pop()        
        refreshSelectionView()
  return false

Any ideas why this is failing in capybara-webkit?

@mhoran
Copy link
Collaborator

mhoran commented Apr 16, 2013

Unfortunately this is a limitation of QtWebKit. See #427 for more details.

@mhoran mhoran closed this as completed Apr 16, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants