0

i need to inject two services to my e2e test to test my service, first UrlDecoratorService second is APIFetcherService how to do that in e2e testing (protractor)?

this is two question i posted to understand my problem.

first post

second post

and right know i don't find the solution.

StephaneM
  • 4,779
  • 1
  • 16
  • 33
Saad
  • 346
  • 4
  • 20
  • Why are you asking the same question again? You *don't* inject services in e2e tests. – jonrsharpe Nov 16 '18 at 15:00
  • 1
    Possible duplicate of [angular e2e testing : how to test Service inject(use) another services](https://stackoverflow.com/questions/53337670/angular-e2e-testing-how-to-test-service-injectuse-another-services) – jonrsharpe Nov 16 '18 at 15:02
  • yeah it's my post , just i want to give a global idea of my project, but how can i test my service(get the real data) by e2e testing? i'm very confused. – Saad Nov 16 '18 at 15:08
  • 2
    This is not what protractor is for. Protractor is for automated UI tests. What you want is an integration test. That's jasmine, has absolutely nothing to do with protractor. I looked at your second post to see what you are trying to do. I mean this in the nicest way possible...you're doing it wrong. You might want to visit the [protractor docs](https://www.protractortest.org/#/getting-started) to see what protractor is meant for. – tehbeardedone Nov 16 '18 at 20:56

0 Answers0