use $interval instead of $timeout for polling

Required to use protractor.
Initial protractor testing config