thoughtbot / capybara-webkit

A Capybara driver for headless WebKit to test JavaScript web apps
https://thoughtbot.com/open-source
MIT License
1.97k stars 428 forks source link

ReferenceError: Can't find variable: fetch #1007

Closed gl2748 closed 6 years ago

gl2748 commented 7 years ago

I am trying to use this... https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API

Getting this from our specs.

ReferenceError: Can't find variable: fetch
twalpole commented 7 years ago

fetch is a relatively new browser feature and is not implemented in the versions of QtWebkit capybara-webkit supports. If you want to use it with capybara-webkit you will need to polyfill the functionality.

raldred commented 7 years ago

I'm using a polyfill (whatwg-fetch) having an issue with requests in a react app. Payload seems to get dropped from PATCH requests.

Works fine if I use poltergeist, so I suspect qt webkit at fault maybe it doesn't support PATCH? POST works fine. I'm have qt5.5 OSX.