Closed ynnelson closed 3 years ago
Thank you for submitting this issue. We would love to assist you and diagnose it. However, we need a simple sample that we can easily run on our side in order to replicate the issue and research its cause. Without a sample, we are not able to figure out what's going on and why this issue occurs. We look forward to your response.
I'll try and make a simple version of it and post.
I tried to make a sample app with Electron, but in this sample app I run up against CORS issue I am unsure how to resolve because I don't control the API server, I used https://jsonplaceholder.typicode.com/ for a dummy API.
Any guidance here would be helpful.
I have an electron application for which I am attempting to write e2e testing but when it comes the MockRequest I seem to be struggling, I followed the documentation on TestCafe website but to no avail, my api call does not seemed to be intercepted and it tries and hit the actual API I have setup.
The code in my react component that would trigger the call is as follow:
So far nothing crazy my test file
Registration.e2e.ts
is as follow:The first test passes no problem the second hits the actual api and doesn't return the desired response of 200, it returns 400 which notifies that the betacode I want to check is invalid.
I have been trying to debug this for hours and can't figure out what's wrong and why the MockRequest intercept isn't working???