Closed julissamackey closed 5 years ago
Well not alone on the 404 front: https://github.com/mdasberg/ng-apimock/issues/40#issuecomment-453744313
@julissamackey your mock json was incorrect.
{
"expression": "api/env",
"method": "GET",
"name": "environmentService",
"isArray": false,
"responses": {
"defaultResponse": {
"default": true,
"status": 200,
"headers": {},
"data": {
"success": true
}
},
"file": "",
"statusText": ""
}
}
You had a } at the end that did not belong there. This works for me. Can you verify?
@Local9 and @julissamackey I have created a pr that upgrades to the latest version of ng-apimock
The problem was that you selected a scenario before you browsed to the page. What happens then is that you have no ngapimockid in your request to the backend. In the new version this has been fixed.
@mdasberg thank you very much, this is all working now. I've updated with your PR and all my santity test worked. I didn't think, due to it being in protractor, about the events process that the site had to be loaded before calling on the API Mock. This new change will now allow setups to be called before landing pages are accessed.
thank you!
Using Angular 4.3.4 & Protractor 5.4.1 Below are my configurations and .json file It seems I must be missing a step or doing something because I am getting 404, the console does output this however
protractor.config:
mock
in my test:
I am getting response