# ---------- Todos ------------ casper.then -> reset() addTasks() # Gained exp on +daily casper.then -> user = userBeforeAfter (-> casper.click '.todos input[type="checkbox"]') @test.assertEquals user.before.stats.hp, user.after.stats.hp, '+daily =hp' @test.assert user.before.stats.exp < user.after.stats.exp, '+daily +exp' @test.assert user.before.stats.money < user.after.stats.money, '+daily +money' # -daily acts as undo casper.then -> user = userBeforeAfter (-> casper.click '.todos input[type="checkbox"]') @test.assertEquals user.before.stats.hp, user.after.stats.hp, '-daily =hp' @test.assert user.before.stats.exp > user.after.stats.exp, '-daily -exp' @test.assert user.before.stats.money > user.after.stats.money, '-daily -money'