unit testing and dom manipulation