added tests to verify that selected node is updated in the rootScope