repaired unit and e2e tests

Karma and Protractor didn't succeed when I launched them.
I modified these tests in this way to make them pass.