refactor: extract controller from progressbar directive and first test