Skip to content

Instantly share code, notes, and snippets.

@RabeaWahab
Created February 11, 2015 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RabeaWahab/5b568b75298cf22135ef to your computer and use it in GitHub Desktop.
Save RabeaWahab/5b568b75298cf22135ef to your computer and use it in GitHub Desktop.
module.exports = {
'EXAMPLE.com HomePage': function (test) {
// Just a random number
var now = Math.floor(Date.now() / 1000);
test
// Open EXAMPLE.com
.open('http://www.EXAMPLE.com')
// This is a chain of assertions
.assert.chain()
.numberOfElements('#hero-carousel-main .carousel-inner .item').is.between([1, 15], 'Testing if More than one slide exists on the homepage.')
.numberOfElements('#menu-default .vnav .menu-item-link').is.between([5, 15], 'Testing if Menu exists.')
.exists('.fluid-width-video-wrapper iframe', 'Testing if Video Exists.')
.exists('.sec-shopper', 'Testing if (Need a product we don\'t have?) Block Exists.')
.exists('#abottom', 'Testing if Footer Exists.')
.end()
.screenshot('/path/to/whatever/directory/home_'+now+'.png')
.done()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment