dalekjs/dalek-internal-assertions

Ability to automatically take screenshot on assertion failure

Opened this issue · 5 comments

If a test fails, there is a good chance you want to see what the site/application looked like for that failure. It would be nice to be able to have a configure that would allow on a global level to enable or disable such a feature.

like this.

test
   .fail(function(test) {
     test.screenshot();
   })
   .open(..)
   .assert(..)
   .done();

I don´t believe that it would be a good decision to inject the complete test object into the fail method, but I like the API. Also, when I have added setup & teardown methods, this could be globally set for a complete testsuite.

Will consider to add it for Milestone 0.0.3.

might be an interesting feature! +1 for this.
I'll write down a few thoughts this weekend, how this could be solved

👍