add the unit test using karma and jasmine, and e2e test using protractor

Change-Id: Id2c7e1c4f963665c6086f5e2c58cf4afad51cc88