Open
Description
I 😍 Dalek's API.
One thing that'd I'd like to do is this:
test.open( url ).assert( userIsSignedOut ).done()
function userIsSignedOut() {
this.assert.chain()
.visible('.accountBar')
.text('.username', '')
.end()
}
That would allow me to define reusable steps / assertion groups. I'd like to have the same for steps, like so
test.open( url ).then( takeScreenshots ).done()
function takeScreenshots() {
this.resize({width: 320, height: 480})
this.screenshot('/screenshots/:viewport')
this.resize({width: 768, height: 1024})
this.screenshot('/screenshots/:viewport')
this.resize({width: 1280, height: 800})
this.screenshot('/screenshots/:viewport')
this.resize({width: 1680, height: 1050})
this.screenshot('/screenshots/:viewport')
}
This would make the actual test files very consize and even more readable, at the same time allow for better code reuse. Happy to help building this if you like it