in last week we are trying to add e2e testing to our project, but it seems (after a big research in the web) there is no library that can work with Angular ngModel (version 2+).
what can we do ? is there anything except from protractor, which is not support Angular 2 ngModel and binding ?
I need to look for the following model “data.user.name”.
There is no problem using proactor for ngModel.
Please consider looking in this repository
I already use it. You only need to take the
e2e directory and looking in the
package.json what are the dev dependency.
Edit for your edit: Accessing internal modal “data.user.name”
You should not use
e2e tests for that, that is a non sense. You need regular unit testing for each of your component. Please consider reproducing what there is in the
*.spec.ts in the
src directory. See also the
test-config in the above mentionned repository.
The official doc for unit testing is here
- Accessing the component and its values, like
data.user.nameis on test-unit side, Angular provide a heavy doc (but well made) for that.
Answered By – David Faure
Answer Checked By – Timothy Miller (AngularFixing Admin)