Demos: Added CasperJS functional tests

(cherry picked from commit 2278fc3f21f8563ff9e12cc29d55c0f44a24c65e)