mdasberg / ng-apimock

Node plugin that provides the ability to use scenario based api mocking: for local development for protractor testing
MIT License
99 stars 26 forks source link

Examples for angular2+ and protractor #18

Closed ebem closed 7 years ago

ebem commented 7 years ago

Can You please provide some examples for e2e tests using angular2+ and protractor ?

I tried to do as said in : "Howto use for your protractor tests." But this throws error: ngApimock.selectScenario(...) , Cannot find name 'ngApimock' What am I missing here ? I added global.ngApimock = require('.. path to: protractor.mock.js') and also did: "Using Angular 2 or higher with Protractor?" steps, but no success.

Angular 4.0.0 Protractor ~5.1.0

wswebcreation commented 7 years ago

Hi @ebem ,

Can you please provide your config file how you implemented it. According to the docs it should be required in the onPrepare() method of Protractor.

By the way, you can also find an example here

wswebcreation commented 7 years ago

@ebem

I saw an email from github that you added more info, but I can't see it here. Did something went wrong?

ebem commented 7 years ago

No sorry for my late response. The thing is, I already changed my logic for mockup server in my application, so I can't provide you with the config file, it useless for ng-apimock. I will try this (ng-apimock) package some time in future and will see how it works for my next app and give you a feed back.. So I guess you can close this issue.

P.S Thanks for your fast response.

wswebcreation commented 7 years ago

Ok,

Tnx, I'll close the issue for now