Comments (7)
Thanks, we're actively looking into this now.
from cypressautomocker.
I just pushed a fix. Please give this a try and let me know if this fixes your issue. Thanks!
from cypressautomocker.
Hi @janhoogeveen - I'm happy to take a look. Can you upload a simple application that demonstrates the issue?
from cypressautomocker.
Certainly! Thanks for the offer.
I'll have to find some time in my schedule to get around to actually doing it, but I'll make it easy for you to look into this.
from cypressautomocker.
Hey Scott,
The easiest way to demo this problem is cloning your example repository and make the changes there. I've done that for you in a fork of your project.
https://github.com/janhoogeveen/cypressautomocker
Steps to reproduce this behavior:
- Use
Fetch
somewhere in your API - Install
whatwg-fetch
polyfill (this is included by default in create-react-app) - In
cypress/support/commands.js
file, remove Fetch from the global window (
Removing fetch in step 3 makes sure the Fetch polyfill is active. This polyfill uses XHR to mimick Fetch functionality and should for the most part behave similarly to jQuery's $.ajax()
call.
There's caveats listed in the polyfills repo in how they differ from jQuery's implementation, but I'm not sure if that's related: https://github.com/github/fetch#caveats
from cypressautomocker.
Will let you know asap, thanks!
from cypressautomocker.
Tested it out on a big project and automocking seems to work great now. Thanks for the fix! This is really gonna help us.
(By the way, npm install still installs 1.0.3 so I had to test with npm link to test out 1.0.4)
from cypressautomocker.
Related Issues (15)
- TypeScript HOT 2
- addEventListener is missing in XHRRequest mock HOT 3
- Latest code is not deployed to npm HOT 1
- MOCKING ON, but letting this fall through HOT 2
- wait after mocking HOT 1
- Queries not being recorded on POST requests HOT 2
- Test fails when I add cypressautomocker HOT 4
- Stubbed request aborted HOT 1
- Cypress ^3.3.0 Doesn't Recognize `/` at Beginning of Relative Path HOT 4
- Clarification about the web hooks HOT 2
- mocks are not being recording after initial test runs
- What method of testing are you using now? HOT 2
- Last working version Cypress known to work
- AlertMedia AutoMock repo HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypressautomocker.