Add tests for new JS helper methods, fix broken specs

https://github.com/ManageIQ/manageiq/issues/214