0

We are using an Angular/Umbraco hybrid app for an online order procedure and now we want to set up e2e tests based on karma and ng-scenario.

The thing is that there are steps in the process that are served as static pages, e.g. user login with email and password is not handled by Angular but by backend framework Umbraco (with typical form POST method). The e2e ng-scenario test cannot procceed through these stepts because input(name).enter(value) command only accepts a valid ng-model as a name and, thus, cannot simulate entering user email and password in the input fields.

What is more, we would like to test also user proceeding to the payment service (in test mode) and returning back to our page after successful payment.

Has anyone encountered a similar setup/situation and found a graceful‎ solution?

Harijs Deksnis
  • 1,366
  • 1
  • 13
  • 24

2 Answers2

-1

This sounds more like an integration test than a unit test.

Perhaps a tool like Selenium would be a better approach to testing the AngularJS/Umbraco cross-over points?

BeaverProj
  • 2,205
  • 1
  • 17
  • 31
-1

Noted that this question was asked almost a year ago. Since then ng-scenario (Angular Scenario Runner) has been deprecated.

At the moment, the angular guide points to Protractor for angular e2e testing.

For non-angular e2e testing, you can also use Protractor via its WebDriver ('browser.driver').

Learn more from Protractor tutorial and also from ng-learn.org

Henry Neo
  • 2,357
  • 1
  • 24
  • 27