Fixed dahsboard.js tests which were failing

Encountered an issue with the dashboard metrics test failing on a live server. Re-factored the test script