AngularJS app with a dialog - experimenting with validation, unit tests and e2e tests