Fixed CasperJS test for preferences widget